svn commit: r265776 - head/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Fri May 9 14:15:48 UTC 2014


Author: tuexen
Date: Fri May  9 14:15:48 2014
New Revision: 265776
URL: http://svnweb.freebsd.org/changeset/base/265776

Log:
  Fix a logic bug which prevented the sending of UDP packet with 0 checksum.
  This bug was introduced in r264212 and should be X-MFCed with that
  revision, if UDP-Lite support if MFCed.

Modified:
  head/sys/netinet/udp_usrreq.c

Modified: head/sys/netinet/udp_usrreq.c
==============================================================================
--- head/sys/netinet/udp_usrreq.c	Fri May  9 14:02:18 2014	(r265775)
+++ head/sys/netinet/udp_usrreq.c	Fri May  9 14:15:48 2014	(r265776)
@@ -1375,7 +1375,8 @@ udp_output(struct inpcb *inp, struct mbu
 			faddr.s_addr = INADDR_BROADCAST;
 		if ((ui->ui_sum = in_cksum(m, sizeof(struct ip) + cscov)) == 0)
 			ui->ui_sum = 0xffff;
-	} else if (V_udp_cksum || !cscov_partial) {
+	} else if (V_udp_cksum || pr == IPPROTO_UDPLITE) {
+		/* for UDP-Lite full checksum coverage is requested */
 		if (inp->inp_flags & INP_ONESBCAST)
 			faddr.s_addr = INADDR_BROADCAST;
 		ui->ui_sum = in_pseudo(ui->ui_src.s_addr, faddr.s_addr,


More information about the svn-src-head mailing list