• Peng Fan's avatar
    net: bootp: Ignore packets whose yiaddr is 0 · 44c42dd4
    Peng Fan authored
    When doing `dhcp`, there is a bad dhcp server in my network
    which always reply dhcp request with yiaddr 0, which cause
    uboot can not successfully get ipaddr from the good dhcp server.
    But the Linux PC can get the ip address even if there is a bad
    dhcp server. This patch is to fix that even if there is a bad
    dhcp server, uboot can still get ipaddr and tftp work ok.
    The way is to ignore the packets from the bad dhcp server by filtering
    out the yiaddr whose value is 0.
    Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
    Cc: Joe Hershberger <joe.hershberger@ni.com>
    Reviewed-by: default avatarWolfgang Denk <wd@denx.de>
    Acked-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
bootp.c 25.3 KB