Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Sep 2014 07:28:31 +0000 (UTC)
From:      Kevin Lo <kevlo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272296 - head/sys/netinet6
Message-ID:  <201409300728.s8U7SVd8020883@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevlo
Date: Tue Sep 30 07:28:31 2014
New Revision: 272296
URL: http://svnweb.freebsd.org/changeset/base/272296

Log:
  When plen != ulen, it should only be checked when this is UDP.
  
  Spotted by:	bryanv

Modified:
  head/sys/netinet6/udp6_usrreq.c

Modified: head/sys/netinet6/udp6_usrreq.c
==============================================================================
--- head/sys/netinet6/udp6_usrreq.c	Tue Sep 30 05:50:34 2014	(r272295)
+++ head/sys/netinet6/udp6_usrreq.c	Tue Sep 30 07:28:31 2014	(r272296)
@@ -232,7 +232,7 @@ udp6_input(struct mbuf **mp, int *offp, 
 		ulen = plen;
 		cscov_partial = 0;
 	}
-	if (plen != ulen) {
+	if (nxt == IPPROTO_UDP && plen != ulen) {
 		UDPSTAT_INC(udps_badlen);
 		goto badunlocked;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409300728.s8U7SVd8020883>