net: ethernet: Send sender IP address in ARP announce packets
In addition to checking that the ARP entry does not exist as the implementation is done currently, also check if the ARP packet is due to IPv4 link local address configuration. In both cases use the provided IPv4 address instead of the one set for the interface. Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This commit is contained in:
parent
7e14cff8d7
commit
3e798dfd88
@ -297,10 +297,10 @@ static inline struct net_pkt *arp_prepare(struct net_if *iface,
|
||||
memcpy(hdr->src_hwaddr.addr, net_pkt_lladdr_src(pkt)->addr,
|
||||
sizeof(struct net_eth_addr));
|
||||
|
||||
if (entry) {
|
||||
my_addr = if_get_addr(entry->iface, current_ip);
|
||||
} else {
|
||||
if (!entry || (pkt != NULL && net_pkt_ipv4_auto(pkt))) {
|
||||
my_addr = current_ip;
|
||||
} else {
|
||||
my_addr = if_get_addr(entry->iface, current_ip);
|
||||
}
|
||||
|
||||
if (my_addr) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user