Author: tuexen
Date: Sun Apr  8 12:08:20 2018
New Revision: 332273
URL: https://svnweb.freebsd.org/changeset/base/332273

Log:
  Fix a logical inversion bug.
  
  Thanks to Irene Ruengeler for finding and reporting this bug.
  
  MFC after:    3 days

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

Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c      Sun Apr  8 11:55:27 2018        
(r332272)
+++ head/sys/netinet/sctp_usrreq.c      Sun Apr  8 12:08:20 2018        
(r332273)
@@ -204,7 +204,7 @@ sctp_notify(struct sctp_inpcb *inp,
 #endif
                /* no need to unlock here, since the TCB is gone */
        } else if (icmp_code == ICMP_UNREACH_NEEDFRAG) {
-               if ((net->dest_state & SCTP_ADDR_NO_PMTUD) == 0) {
+               if (net->dest_state & SCTP_ADDR_NO_PMTUD) {
                        SCTP_TCB_UNLOCK(stcb);
                        return;
                }

Modified: head/sys/netinet6/sctp6_usrreq.c
==============================================================================
--- head/sys/netinet6/sctp6_usrreq.c    Sun Apr  8 11:55:27 2018        
(r332272)
+++ head/sys/netinet6/sctp6_usrreq.c    Sun Apr  8 12:08:20 2018        
(r332273)
@@ -223,7 +223,7 @@ sctp6_notify(struct sctp_inpcb *inp,
                }
                break;
        case ICMP6_PACKET_TOO_BIG:
-               if ((net->dest_state & SCTP_ADDR_NO_PMTUD) == 0) {
+               if (net->dest_state & SCTP_ADDR_NO_PMTUD) {
                        SCTP_TCB_UNLOCK(stcb);
                        break;
                }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to