Author: tuexen
Date: Sat Jul 21 02:14:13 2018
New Revision: 336574
URL: https://svnweb.freebsd.org/changeset/base/336574
Log:
Set the IPv4 version in the IP header for UDP and UDPLite.
Modified:
head/sys/netinet/udp_usrreq.c
Modified: head/sys/netinet/udp_usrreq.c
==============================================================================
--- head/sys/netinet/udp_usrreq.c Sat Jul 21 01:33:07 2018
(r336573)
+++ head/sys/netinet/udp_usrreq.c Sat Jul 21 02:14:13 2018
(r336574)
@@ -1397,6 +1397,7 @@ udp_output(struct inpcb *inp, struct mbuf *m, struct s
*/
ui = mtod(m, struct udpiphdr *);
bzero(ui->ui_x1, sizeof(ui->ui_x1)); /* XXX still needed? */
+ ui->ui_v = IPVERSION << 4;
ui->ui_pr = pr;
ui->ui_src = laddr;
ui->ui_dst = faddr;
@@ -1419,8 +1420,7 @@ udp_output(struct inpcb *inp, struct mbuf *m, struct s
* the entire UDPLite packet is covered by the checksum.
*/
cscov_partial = (cscov == 0) ? 0 : 1;
- } else
- ui->ui_v = IPVERSION << 4;
+ }
/*
* Set the Don't Fragment bit in the IP header.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"