Remove ifa_list, use ifa_link (structure field) instead.
While here, prefer if_addrhead (FreeBSD) to if_addrlist (BSD compat) naming for the interface address list in sctp_bsd_addr.c Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D8051
This commit is contained in:
parent
2d1c384470
commit
c7641cd18d
@ -448,9 +448,6 @@ struct ifaddr {
|
||||
counter_u64_t ifa_obytes;
|
||||
};
|
||||
|
||||
/* For compatibility with other BSDs. SCTP uses it. */
|
||||
#define ifa_list ifa_link
|
||||
|
||||
struct ifaddr * ifa_alloc(size_t size, int flags);
|
||||
void ifa_free(struct ifaddr *ifa);
|
||||
void ifa_ref(struct ifaddr *ifa);
|
||||
|
@ -214,7 +214,7 @@ sctp_init_ifns_for_vrf(int vrfid)
|
||||
continue;
|
||||
}
|
||||
IF_ADDR_RLOCK(ifn);
|
||||
TAILQ_FOREACH(ifa, &ifn->if_addrlist, ifa_list) {
|
||||
TAILQ_FOREACH(ifa, &ifn->if_addrhead, ifa_link) {
|
||||
if (ifa->ifa_addr == NULL) {
|
||||
continue;
|
||||
}
|
||||
@ -365,7 +365,7 @@ void
|
||||
if (!(*pred) (ifn)) {
|
||||
continue;
|
||||
}
|
||||
TAILQ_FOREACH(ifa, &ifn->if_addrlist, ifa_list) {
|
||||
TAILQ_FOREACH(ifa, &ifn->if_addrhead, ifa_link) {
|
||||
sctp_addr_change(ifa, add ? RTM_ADD : RTM_DELETE);
|
||||
}
|
||||
}
|
||||
|
@ -523,7 +523,7 @@ pfi_instance_add(struct ifnet *ifp, int net, int flags)
|
||||
int net2, af;
|
||||
|
||||
IF_ADDR_RLOCK(ifp);
|
||||
TAILQ_FOREACH(ia, &ifp->if_addrhead, ifa_list) {
|
||||
TAILQ_FOREACH(ia, &ifp->if_addrhead, ifa_link) {
|
||||
if (ia->ifa_addr == NULL)
|
||||
continue;
|
||||
af = ia->ifa_addr->sa_family;
|
||||
|
Loading…
x
Reference in New Issue
Block a user