Deleted Added
full compact
21c21
< __FBSDID("$FreeBSD: head/sys/net/if_lagg.c 267992 2014-06-28 03:56:17Z hselasky $");
---
> __FBSDID("$FreeBSD: head/sys/net/if_lagg.c 269492 2014-08-04 00:58:12Z mav $");
1220,1221c1220
< struct ifmultiaddr *ifma, *rifma = NULL;
< struct sockaddr_dl sdl;
---
> struct ifmultiaddr *ifma;
1226,1228d1224
< link_init_sdl(ifp, (struct sockaddr *)&sdl, IFT_ETHER);
< sdl.sdl_alen = ETHER_ADDR_LEN;
<
1229a1226
> IF_ADDR_WLOCK(scifp);
1233,1238d1229
< bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr),
< LLADDR(&sdl), ETHER_ADDR_LEN);
<
< error = if_addmulti(ifp, (struct sockaddr *)&sdl, &rifma);
< if (error)
< return (error);
1240c1231,1232
< if (mc == NULL)
---
> if (mc == NULL) {
> IF_ADDR_WUNLOCK(scifp);
1242c1234,1238
< mc->mc_ifma = rifma;
---
> }
> bcopy(ifma->ifma_addr, &mc->mc_addr,
> ifma->ifma_addr->sa_len);
> mc->mc_addr.sdl_index = ifp->if_index;
> mc->mc_ifma = NULL;
1244a1241,1247
> IF_ADDR_WUNLOCK(scifp);
> SLIST_FOREACH (mc, &lp->lp_mc_head, mc_entries) {
> error = if_addmulti(ifp,
> (struct sockaddr *)&mc->mc_addr, &mc->mc_ifma);
> if (error)
> return (error);
> }
1248c1251,1252
< if_delmulti_ifma(mc->mc_ifma);
---
> if (mc->mc_ifma && !lp->lp_detaching)
> if_delmulti_ifma(mc->mc_ifma);