svn commit: r302138 - in head/sys: netinet netinet6

Michael Tuexen tuexen at FreeBSD.org
Thu Jun 23 09:13:17 UTC 2016


Author: tuexen
Date: Thu Jun 23 09:13:15 2016
New Revision: 302138
URL: https://svnweb.freebsd.org/changeset/base/302138

Log:
  Don't consider the socket when processing an incoming ICMP/ICMP6 packet,
  which was triggered by an SCTP packet. Whether a socket exists, is just
  not relevant.
  
  Approved by: re (kib)
  MFC after: 1 week

Modified:
  head/sys/netinet/sctp_usrreq.c
  head/sys/netinet/sctputil.c
  head/sys/netinet6/sctp6_usrreq.c

Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c	Thu Jun 23 09:06:11 2016	(r302137)
+++ head/sys/netinet/sctp_usrreq.c	Thu Jun 23 09:13:15 2016	(r302138)
@@ -291,8 +291,7 @@ sctp_ctlinput(int cmd, struct sockaddr *
 		    SCTP_DEFAULT_VRFID);
 		if ((stcb != NULL) &&
 		    (net != NULL) &&
-		    (inp != NULL) &&
-		    (inp->sctp_socket != NULL)) {
+		    (inp != NULL)) {
 			/* Check the verification tag */
 			if (ntohl(sh->v_tag) != 0) {
 				/*

Modified: head/sys/netinet/sctputil.c
==============================================================================
--- head/sys/netinet/sctputil.c	Thu Jun 23 09:06:11 2016	(r302137)
+++ head/sys/netinet/sctputil.c	Thu Jun 23 09:13:15 2016	(r302138)
@@ -6965,8 +6965,7 @@ sctp_recv_icmp_tunneled_packet(int cmd, 
 	    SCTP_DEFAULT_VRFID);
 	if ((stcb != NULL) &&
 	    (net != NULL) &&
-	    (inp != NULL) &&
-	    (inp->sctp_socket != NULL)) {
+	    (inp != NULL)) {
 		/* Check the UDP port numbers */
 		if ((udp->uh_dport != net->port) ||
 		    (udp->uh_sport != htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)))) {
@@ -7092,8 +7091,7 @@ sctp_recv_icmp6_tunneled_packet(int cmd,
 	    &inp, &net, 1, SCTP_DEFAULT_VRFID);
 	if ((stcb != NULL) &&
 	    (net != NULL) &&
-	    (inp != NULL) &&
-	    (inp->sctp_socket != NULL)) {
+	    (inp != NULL)) {
 		/* Check the UDP port numbers */
 		if ((udp.uh_dport != net->port) ||
 		    (udp.uh_sport != htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)))) {

Modified: head/sys/netinet6/sctp6_usrreq.c
==============================================================================
--- head/sys/netinet6/sctp6_usrreq.c	Thu Jun 23 09:06:11 2016	(r302137)
+++ head/sys/netinet6/sctp6_usrreq.c	Thu Jun 23 09:13:15 2016	(r302138)
@@ -341,8 +341,7 @@ sctp6_ctlinput(int cmd, struct sockaddr 
 		    &inp, &net, 1, SCTP_DEFAULT_VRFID);
 		if ((stcb != NULL) &&
 		    (net != NULL) &&
-		    (inp != NULL) &&
-		    (inp->sctp_socket != NULL)) {
+		    (inp != NULL)) {
 			/* Check the verification tag */
 			if (ntohl(sh.v_tag) != 0) {
 				/*


More information about the svn-src-all mailing list