• Gerhard Sittig's avatar
    net: dns: fix for DNS queries sent to the wrong MAC address · f395e75e
    Gerhard Sittig authored
    When a DNS query is sent out, the ethernet packet can get directed to
    the MAC address of a server that was communicated to before.  This is
    wrong when the previously stored MAC address corresponds to a different
    server's IP address, i.e. when the IP address of the previous and the
    current communication are different.
    
    The error can get reproduced by running a sequence of e.g. a TFTP
    download and a DNS query, where the TFTP and DNS servers reside on
    individual machines.
    
    The fix is to clear the server's MAC address that might be left from a
    previous operation, and to fetch the peer's MAC address in a new ARP
    lookup, before the DNS query is sent.  This is the approach taken in
    other network services, like 8e52533d ("net: tftpsrv: Get correct
    client MAC address").
    Reported-by: 's avatarDirk Zimoch <dirk.zimoch@psi.ch>
    Signed-off-by: 's avatarGerhard Sittig <gsi@denx.de>
    f395e75e
Name
Last commit
Last update
..
Makefile Loading commit data...
arp.c Loading commit data...
arp.h Loading commit data...
bootp.c Loading commit data...
bootp.h Loading commit data...
cdp.c Loading commit data...
cdp.h Loading commit data...
dns.c Loading commit data...
dns.h Loading commit data...
eth.c Loading commit data...
link_local.c Loading commit data...
link_local.h Loading commit data...
net.c Loading commit data...
net_rand.h Loading commit data...
nfs.c Loading commit data...
nfs.h Loading commit data...
ping.c Loading commit data...
ping.h Loading commit data...
rarp.c Loading commit data...
rarp.h Loading commit data...
sntp.c Loading commit data...
sntp.h Loading commit data...
tftp.c Loading commit data...
tftp.h Loading commit data...