Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 May 2019 12:34:32 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r347156 - stable/11/sys/netinet
Message-ID:  <201905051234.x45CYWxs034512@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905051234.x45CYWxs034512>