Skip to content
Browse files

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

Signed-off-by: Patrik Flykt <>
  • Loading branch information...
Patrik Flykt authored and galak committed Apr 12, 2019
1 parent 7e14cff commit 3e798dfd88c219385a74150e70a413f021e8a161
Showing with 3 additions and 3 deletions.
  1. +3 −3 subsys/net/l2/ethernet/arp.c
@@ -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) {

0 comments on commit 3e798df

Please sign in to comment.
You can’t perform that action at this time.