svn commit: r347156 - stable/11/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Sun May 5 12:34:34 UTC 2019
Author: tuexen
Date: Sun May 5 12:34:32 2019
New Revision: 347156
URL: https://svnweb.freebsd.org/changeset/base/347156
Log:
MFC r336574:
Set the IPv4 version in the IP header for UDP and UDPLite.
Modified:
stable/11/sys/netinet/udp_usrreq.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/netinet/udp_usrreq.c
==============================================================================
--- stable/11/sys/netinet/udp_usrreq.c Sun May 5 12:32:47 2019 (r347155)
+++ stable/11/sys/netinet/udp_usrreq.c Sun May 5 12:34:32 2019 (r347156)
@@ -1383,6 +1383,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;
@@ -1405,8 +1406,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.
More information about the svn-src-all
mailing list