Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Oct 2018 11:30:46 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339327 - head/sys/netinet
Message-ID:  <201810121130.w9CBUkxW074557@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Fri Oct 12 11:30:46 2018
New Revision: 339327
URL: https://svnweb.freebsd.org/changeset/base/339327

Log:
  r217592 moved the check for imo in udp_input() into the conditional block
  but leaving the variable assignment outside the block, where it is no longer
  used. Move both the variable and the assignment one block further in.
  
  This should result in no functional changes. It will however make upcoming
  changes slightly easier to apply.
  
  Reviewed by:		markj, jtl, tuexen
  Approved by:		re (kib)
  Differential Revision:	https://reviews.freebsd.org/D17525

Modified:
  head/sys/netinet/udp_usrreq.c

Modified: head/sys/netinet/udp_usrreq.c
==============================================================================
--- head/sys/netinet/udp_usrreq.c	Fri Oct 12 05:42:38 2018	(r339326)
+++ head/sys/netinet/udp_usrreq.c	Fri Oct 12 11:30:46 2018	(r339327)
@@ -528,7 +528,6 @@ udp_input(struct mbuf **mp, int *offp, int proto)
 	    in_broadcast(ip->ip_dst, ifp)) {
 		struct inpcb *last;
 		struct inpcbhead *pcblist;
-		struct ip_moptions *imo;
 
 		INP_INFO_RLOCK_ET(pcbinfo, et);
 		pcblist = udp_get_pcblist(proto);
@@ -563,10 +562,12 @@ udp_input(struct mbuf **mp, int *offp, int proto)
 			 * Handle socket delivery policy for any-source
 			 * and source-specific multicast. [RFC3678]
 			 */
-			imo = inp->inp_moptions;
 			if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
+				struct ip_moptions	*imo;
 				struct sockaddr_in	 group;
 				int			 blocked;
+
+				imo = inp->inp_moptions;
 				if (imo == NULL) {
 					INP_RUNLOCK(inp);
 					continue;



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