Fix issues introduced by r292275
* Fix panic for etherswitches which don't have a LLADDR. * Disabled DELAY in unsolicited NDA, which needs further work. * Fixed missing DELAY in carp_send_na. * style(9) fix. Reported by: kp & melifaro X-MFC-With: r292275 MFC after: 1 month Sponsored by: Multiplay
This commit is contained in:
parent
63cd1c131a
commit
0813e34dbc
@ -1217,7 +1217,8 @@ arp_announce(struct ifnet *ifp)
|
||||
struct ifaddr *ifa;
|
||||
struct in_addr *addr, *head;
|
||||
|
||||
if (!(ifp->if_flags & IFF_UP) || (ifp->if_flags & IFF_NOARP))
|
||||
if (!(ifp->if_flags & IFF_UP) || (ifp->if_flags & IFF_NOARP) ||
|
||||
ifp->if_addr == NULL)
|
||||
return;
|
||||
|
||||
entries = 8;
|
||||
@ -1254,9 +1255,11 @@ arp_announce(struct ifnet *ifp)
|
||||
}
|
||||
IF_ADDR_RUNLOCK(ifp);
|
||||
|
||||
lladdr = IF_LLADDR(ifp);
|
||||
for (i = 0; i < cnt; i++) {
|
||||
arp_announce_addr(ifp, head + i, lladdr);
|
||||
if (cnt > 0) {
|
||||
lladdr = IF_LLADDR(ifp);
|
||||
for (i = 0; i < cnt; i++) {
|
||||
arp_announce_addr(ifp, head + i, lladdr);
|
||||
}
|
||||
}
|
||||
free(head, M_TEMP);
|
||||
}
|
||||
|
@ -1045,7 +1045,7 @@ carp_send_na(struct carp_softc *sc)
|
||||
|
||||
nd6_na_output_unsolicited_addr(sc->sc_carpdev, IFA_IN6(ifa),
|
||||
IFA_ND6_NA_BASE_FLAGS(sc->sc_carpdev, ifa));
|
||||
nd6_na_unsolicited_addr_delay(ifa);
|
||||
DELAY(nd6_na_unsolicited_addr_delay(ifa));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -209,6 +209,7 @@ nd6_ifnet_link_event(void *arg __unused, struct ifnet *ifp, int linkstate)
|
||||
if (linkstate == LINK_STATE_UP && V_nd6_on_link)
|
||||
nd6_na_output_unsolicited(ifp);
|
||||
}
|
||||
|
||||
void
|
||||
nd6_init(void)
|
||||
{
|
||||
|
@ -1646,7 +1646,8 @@ nd6_na_output_unsolicited(struct ifnet *ifp)
|
||||
i++;
|
||||
if (i == cnt)
|
||||
break;
|
||||
DELAY(ann1->delay);
|
||||
/* XXX DELAY needs to be done in taskqueue to avoid stalling. */
|
||||
//DELAY(ann1->delay);
|
||||
}
|
||||
free(head, M_TEMP);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user