From 9a7bd94b2257403a935f45867ca01d15558cf9d4 Mon Sep 17 00:00:00 2001 From: KonnovKM Date: Mon, 17 Jul 2023 15:07:00 +0300 Subject: no continue Signed-off-by: KonnovKM --- dhcpv4/nclient4/conn_unix.go | 6 ++++-- 1 file 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) { -- cgit v1.2.3