* Attach MLD when PF_INET6 is attached to an interface. * * SMPng: Normally called with IF_AFDATA_LOCK held. */
| 475 | * SMPng: Normally called with IF_AFDATA_LOCK held. |
| 476 | */ |
| 477 | struct mld_ifsoftc * |
| 478 | mld_domifattach(struct ifnet *ifp) |
| 479 | { |
| 480 | struct mld_ifsoftc *mli; |
| 481 | |
| 482 | CTR3(KTR_MLD, "%s: called for ifp %p(%s)", |
| 483 | __func__, ifp, if_name(ifp)); |
| 484 | |
| 485 | MLD_LOCK(); |
| 486 | |
| 487 | mli = mli_alloc_locked(ifp); |
| 488 | if (!(ifp->if_flags & IFF_MULTICAST)) |
| 489 | mli->mli_flags |= MLIF_SILENT; |
| 490 | if (mld_use_allow) |
| 491 | mli->mli_flags |= MLIF_USEALLOW; |
| 492 | |
| 493 | MLD_UNLOCK(); |
| 494 | |
| 495 | return (mli); |
| 496 | } |
| 497 | |
| 498 | /* |
| 499 | * VIMAGE: assume curvnet set by caller. |
no test coverage detected