Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Apr 2009 10:14:16 +0000 (UTC)
From:      Bruce M Simpson <bms@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r191659 - head/sys/netinet
Message-ID:  <200904291014.n3TAEGeh076148@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bms
Date: Wed Apr 29 10:14:16 2009
New Revision: 191659
URL: http://svn.freebsd.org/changeset/base/191659

Log:
  Cut over to KTR_INET for CTR.
  For clarity, put pointer incremement/size decrement on own line
  when copying out in-mode source filters to userland.

Modified:
  head/sys/netinet/in_mcast.c

Modified: head/sys/netinet/in_mcast.c
==============================================================================
--- head/sys/netinet/in_mcast.c	Wed Apr 29 10:13:22 2009	(r191658)
+++ head/sys/netinet/in_mcast.c	Wed Apr 29 10:14:16 2009	(r191659)
@@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$");
 #include <netinet/vinet.h>
 
 #ifndef KTR_IGMPV3
-#define KTR_IGMPV3 KTR_SUBSYS
+#define KTR_IGMPV3 KTR_INET
 #endif
 
 #ifndef __SOCKUNION_DECLARED
@@ -1647,11 +1647,14 @@ inp_get_source_filters(struct inpcb *inp
 		    lims->imsl_st[0] != imf->imf_st[0])
 			continue;
 		++ncsrcs;
-		if (tss != NULL && nsrcs-- > 0) {
-			psin = (struct sockaddr_in *)ptss++;
+		if (tss != NULL && nsrcs > 0) {
+			psin = (struct sockaddr_in *)ptss;
 			psin->sin_family = AF_INET;
 			psin->sin_len = sizeof(struct sockaddr_in);
 			psin->sin_addr.s_addr = htonl(lims->ims_haddr);
+			psin->sin_port = 0;
+			++ptss;
+			--nsrcs;
 		}
 	}
 



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