]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - net/bootp.c
net: bootp: Ignore packets whose yiaddr is 0
[people/ms/u-boot.git] / net / bootp.c
index 8aeddb08ea83f0bf1094d9cb72938df4357801dc..8da2e9b8b43fd7aa8eb37b666d2aacbbb20720cc 100644 (file)
@@ -995,6 +995,9 @@ static void dhcp_handler(uchar *pkt, unsigned dest, struct in_addr sip,
        debug("DHCPHandler: got DHCP packet: (src=%d, dst=%d, len=%d) state: "
              "%d\n", src, dest, len, dhcp_state);
 
+       if (net_read_ip(&bp->bp_yiaddr).s_addr == 0)
+               return;
+
        switch (dhcp_state) {
        case SELECTING:
                /*