From 83e95fb30b3ab55853c5aaecea6988f4ffc06c84 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Wed, 1 Oct 2014 05:43:29 +0000 Subject: The default for UDPLITE_RECV_CSCOV is zero. RFC 3828 recommend that this means full checksum coverage for received packets. If an application is willing to accept packets with partial coverage, it is expected to use the socekt option and provice the minimum coverage it accepts. Reviewed by: kevlo MFC after: 3 days --- sys/netinet6/udp6_usrreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/netinet6/udp6_usrreq.c') diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 22981876ef4e..28f2753ac98d 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -261,7 +261,7 @@ udp6_input(struct mbuf **mp, int *offp, int proto) if (uh_sum != 0) { UDPSTAT_INC(udps_badsum); - goto badunlocked; + /*goto badunlocked;*/ } /* @@ -481,7 +481,7 @@ udp6_input(struct mbuf **mp, int *offp, int proto) INP_RLOCK_ASSERT(inp); up = intoudpcb(inp); if (cscov_partial) { - if (up->u_rxcslen > ulen) { + if (up->u_rxcslen == 0 || up->u_rxcslen > ulen) { INP_RUNLOCK(inp); m_freem(m); return (IPPROTO_DONE); -- cgit v1.2.3