svn commit: r297362 - head/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Mon Mar 28 19:32:14 UTC 2016


Author: tuexen
Date: Mon Mar 28 19:32:13 2016
New Revision: 297362
URL: https://svnweb.freebsd.org/changeset/base/297362

Log:
  Don't allow the user to set a peer primary which is restricted
  and not pending.
  
  MFC after: 1 week

Modified:
  head/sys/netinet/sctp_usrreq.c

Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c	Mon Mar 28 19:31:10 2016	(r297361)
+++ head/sys/netinet/sctp_usrreq.c	Mon Mar 28 19:32:13 2016	(r297362)
@@ -5816,6 +5816,10 @@ sctp_setopt(struct socket *so, int optna
 							    __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;


More information about the svn-src-head mailing list