Don't allow the user to set a peer primary which is restricted

and not pending.

MFC after: 1 week
This commit is contained in:
Michael Tuexen 2016-03-28 19:32:13 +00:00
parent 76f8482a93
commit a08b29253d

View File

@ -5816,6 +5816,10 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
__func__);
continue;
}
if ((sctp_is_addr_restricted(stcb, laddr->ifa)) &&
(!sctp_is_addr_pending(stcb, laddr->ifa))) {
continue;
}
if (laddr->ifa == ifa) {
found = 1;
break;