diff options
author | KonnovKM <boneyandoom@gmail.com> | 2023-07-17 15:07:00 +0300 |
---|---|---|
committer | KonnovKM <boneyandoom@gmail.com> | 2023-07-18 10:23:06 +0300 |
commit | 9a7bd94b2257403a935f45867ca01d15558cf9d4 (patch) | |
tree | 4a90dd2401c5c7116fd1dde781a15137c802e245 /dhcpv4 | |
parent | 5cb40274fad0127d68a331c30f667a38d9a064e0 (diff) |
no continue
Signed-off-by: KonnovKM <boneyandoom@gmail.com>
Diffstat (limited to 'dhcpv4')
-rw-r--r-- | dhcpv4/nclient4/conn_unix.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dhcpv4/nclient4/conn_unix.go b/dhcpv4/nclient4/conn_unix.go index 67ac94c..239d007 100644 --- a/dhcpv4/nclient4/conn_unix.go +++ b/dhcpv4/nclient4/conn_unix.go @@ -113,8 +113,10 @@ func (upc *BroadcastRawUDPConn) ReadFrom(b []byte) (int, net.Addr, error) { ipHdr = ipv4(buf.Consume(int(headerLength))) - if headerLength <= protocol || ipHdr.transportProtocol() != udpProtocolNumber { - continue + if headerLength > protocol { + if ipHdr.transportProtocol() != udpProtocolNumber { + continue + } } if !buf.Has(udpHdrLen) { |