Date: Fri, 9 May 2014 14:15:48 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265776 - head/sys/netinet Message-ID: <201405091415.s49EFm1v082933@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405091415.s49EFm1v082933>