Author: tuexen
Date: Sat Jan 30 11:10:22 2016
New Revision: 295070
URL: https://svnweb.freebsd.org/changeset/base/295070

Log:
  Don't change the remote UDP encapsulation port for SCTP packets
  containing an INIT chunk.
  
  MFC after: 3 days

Modified:
  head/sys/netinet/sctp_input.c

Modified: head/sys/netinet/sctp_input.c
==============================================================================
--- head/sys/netinet/sctp_input.c       Sat Jan 30 10:39:05 2016        
(r295069)
+++ head/sys/netinet/sctp_input.c       Sat Jan 30 11:10:22 2016        
(r295070)
@@ -5684,7 +5684,9 @@ sctp_common_input_processing(struct mbuf
                        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
        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
                         */
                        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));
                                }
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to