- Add VRF id to sctp_ifa structure, needed mainly in panda but useful

during deletes of ifa's in diff VRF's when applicable.
This commit is contained in:
Randall Stewart 2007-06-15 03:16:48 +00:00
parent 5632c9822a
commit 22a6719709
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170751
3 changed files with 7 additions and 1 deletions

View File

@ -1704,6 +1704,11 @@ sctp_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr,
LIST_FOREACH(l, &asc->list_of_work, sctp_nxt_addr) {
ifa = l->ifa;
type = l->action;
/* address's vrf_id must be the vrf_id of the assoc */
if (ifa->vrf_id != stcb->asoc.vrf_id) {
continue;
}
/* Same checks again for assoc */
if (ifa->address.sa.sa_family == AF_INET6) {
/* invalid if we're not a v6 endpoint */

View File

@ -414,7 +414,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index,
memset(sctp_ifap, 0, sizeof(struct sctp_ifa));
sctp_ifap->ifn_p = sctp_ifnp;
atomic_add_int(&sctp_ifnp->refcount, 1);
sctp_ifap->vrf_id = vrf_id;
sctp_ifap->ifa = ifa;
memcpy(&sctp_ifap->address, addr, addr->sa_len);
sctp_ifap->localifa_flags = SCTP_ADDR_VALID | SCTP_ADDR_DEFER_USE;

View File

@ -109,6 +109,7 @@ struct sctp_ifa {
uint32_t refcount; /* number of folks refering to this */
uint32_t flags;
uint32_t localifa_flags;
uint32_t vrf_id; /* vrf_id of this addr (for deleting) */
uint8_t src_is_loop;
uint8_t src_is_priv;
uint8_t src_is_glob;