Index: sys/net/if.c =================================================================== --- sys/net/if.c (revision 289450) +++ sys/net/if.c (working copy) @@ -3315,7 +3315,7 @@ if_delmulti_locked(struct ifnet *ifp, struct ifmul * At this time we only support certain types of interfaces, * and we don't allow the length of the address to change. */ -int +__noinline int if_setlladdr(struct ifnet *ifp, const u_char *lladdr, int len) { struct sockaddr_dl *sdl; Index: sys/net/if_lagg.c =================================================================== --- sys/net/if_lagg.c (revision 289450) +++ sys/net/if_lagg.c (working copy) @@ -730,7 +754,7 @@ lagg_port_create(struct lagg_softc *sc, struct ifn } /* XXX Disallow non-ethernet interfaces (this should be any of 802) */ - if (ifp->if_type != IFT_ETHER) + if (ifp->if_type != IFT_ETHER && ifp->if_type != IFT_L2VLAN) return (EPROTONOSUPPORT); /* Allow the first Ethernet member to define the MTU */ Index: sys/netinet/if_ether.c =================================================================== --- sys/netinet/if_ether.c (revision 289450) +++ sys/netinet/if_ether.c (working copy) @@ -144,7 +144,9 @@ static void arp_check_update_lle(struct arphdr *ah static void arp_update_lle(struct arphdr *ah, struct ifnet *ifp, struct llentry *la); static void arp_mark_lle_reachable(struct llentry *la); +static void arp_iflladdr(void *arg __unused, struct ifnet *ifp); +static eventhandler_tag iflladdr_tag; static const struct netisr_handler arp_nh = { .nh_name = "arp", @@ -1163,10 +1165,35 @@ arp_ifinit2(struct ifnet *ifp, struct ifaddr *ifa, ifa->ifa_rtrequest = NULL; } +/* + * A handler for interface link layer address change event. + */ +static __noinline void +arp_iflladdr(void *arg __unused, struct ifnet *ifp) +{ + struct ifaddr *ifa; + + if ((ifp->if_flags & IFF_UP) == 0) + return; + + return; + + /* + * Also send gratuitous ARPs to notify other nodes about + * the address change. + */ + TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { + if (ifa->ifa_addr->sa_family == AF_INET) + arp_ifinit(ifp, ifa); + } +} + static void arp_init(void) { netisr_register(&arp_nh); + iflladdr_tag = EVENTHANDLER_REGISTER(iflladdr_event, + arp_iflladdr, NULL, EVENTHANDLER_PRI_ANY); } SYSINIT(arp, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, arp_init, 0);