mirror of
https://git.freebsd.org/src.git
synced 2026-01-16 23:02:24 +00:00
sctp: initilize local address flags correctly
Use the same routine for initilizing as for updating. MFC after: 3 days
This commit is contained in:
parent
8f5f6680ef
commit
6ab4b0c0df
1 changed files with 3 additions and 1 deletions
|
|
@ -453,6 +453,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index,
|
|||
SCTPDBG(SCTP_DEBUG_PCB4,
|
||||
"Clearing deleted ifa flag\n");
|
||||
sctp_ifap->localifa_flags = SCTP_ADDR_VALID;
|
||||
sctp_gather_internal_ifa_flags(sctp_ifap);
|
||||
sctp_ifap->ifn_p = sctp_ifnp;
|
||||
atomic_add_int(&sctp_ifap->ifn_p->refcount, 1);
|
||||
}
|
||||
|
|
@ -475,6 +476,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index,
|
|||
} else {
|
||||
/* Repair ifn_p, which was NULL... */
|
||||
sctp_ifap->localifa_flags = SCTP_ADDR_VALID;
|
||||
sctp_gather_internal_ifa_flags(sctp_ifap);
|
||||
SCTPDBG(SCTP_DEBUG_PCB4,
|
||||
"Repairing ifn %p for ifa %p\n",
|
||||
(void *)sctp_ifnp, (void *)sctp_ifap);
|
||||
|
|
@ -499,7 +501,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index,
|
|||
sctp_ifap->ifa = ifa;
|
||||
memcpy(&sctp_ifap->address, addr, addr->sa_len);
|
||||
sctp_ifap->localifa_flags = SCTP_ADDR_VALID | SCTP_ADDR_DEFER_USE;
|
||||
sctp_ifap->flags = ifa_flags;
|
||||
sctp_gather_internal_ifa_flags(sctp_ifap);
|
||||
/* Set scope */
|
||||
switch (sctp_ifap->address.sa.sa_family) {
|
||||
#ifdef INET
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue