From 55b8cd93efe985eda22e2bd384d9f1f0dc554853 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Thu, 23 Jun 2016 09:13:15 +0000 Subject: [PATCH] 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 --- sys/netinet/sctp_usrreq.c | 3 +-- sys/netinet/sctputil.c | 6 ++---- sys/netinet6/sctp6_usrreq.c | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 6e5cbe332831..274702b45fa6 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -291,8 +291,7 @@ sctp_ctlinput(int cmd, struct sockaddr *sa, void *vip) 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) { /* diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 3f6ec551d480..ffb58ed5d020 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -6965,8 +6965,7 @@ sctp_recv_icmp_tunneled_packet(int cmd, struct sockaddr *sa, void *vip, void *ct 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, struct sockaddr *sa, void *d, void *ctx &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)))) { diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c index 647107d3ea2c..cbe50d93eaac 100644 --- a/sys/netinet6/sctp6_usrreq.c +++ b/sys/netinet6/sctp6_usrreq.c @@ -341,8 +341,7 @@ sctp6_ctlinput(int cmd, struct sockaddr *pktdst, void *d) &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) { /*