From 8a9d3a9d9f89f3731ef2821665265c9fd250bbff Mon Sep 17 00:00:00 2001 From: tuexen Date: Sat, 30 Jan 2016 11:10:22 +0000 Subject: Don't change the remote UDP encapsulation port for SCTP packets containing an INIT chunk. MFC after: 3 days --- sys/netinet/sctp_input.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'sys/netinet') diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 9edfcf6..1dbb6cf 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -5684,7 +5684,9 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, int lengt stcb = sctp_findassociation_addr(m, offset, src, dst, sh, ch, &inp, &net, vrf_id); #if defined(INET) || defined(INET6) - if ((net != NULL) && (port != 0)) { + if ((net != NULL) && + (ch->chunk_type != SCTP_INITIATION) && + (port != 0)) { if (net->port == 0) { sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); } @@ -5715,7 +5717,9 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, int lengt stcb = sctp_findassociation_addr(m, offset, src, dst, sh, ch, &inp, &net, vrf_id); #if defined(INET) || defined(INET6) - if ((net != NULL) && (port != 0)) { + if ((net != NULL) && + (ch->chunk_type != SCTP_INITIATION) && + (port != 0)) { if (net->port == 0) { sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); } @@ -5827,7 +5831,9 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, int lengt */ inp = stcb->sctp_ep; #if defined(INET) || defined(INET6) - if ((net != NULL) && (port != 0)) { + if ((net != NULL) && + (ch->chunk_type != SCTP_INITIATION) && + (port != 0)) { if (net->port == 0) { sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); } -- cgit v1.1