summaryrefslogtreecommitdiff
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2002-02-18 22:50:13 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2002-02-18 22:50:13 +0000
commitb2c08f43d0c69d20ff6e537698bdfbf523f168bb (patch)
tree59c863f9cd8865f877bc686b78df5a54c6385ef9 /sys/net/if.c
parentdcafc12e41db0d3fe7bd44bac53e49fc712ea2fa (diff)
Notes
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 83101906c6b4..a88d8361fb14 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1819,6 +1819,17 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, int len)
(*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, NULL);
ifp->if_flags |= IFF_UP;
(*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, NULL);
+#ifdef INET
+ /*
+ * Also send gratuitous ARPs to notify other nodes about
+ * the address change.
+ */
+ TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
+ if (ifa->ifa_addr != NULL &&
+ ifa->ifa_addr->sa_family == AF_INET)
+ arp_ifinit((struct arpcom *)ifp, ifa);
+ }
+#endif
}
return (0);
}