Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Sep 2007 08:29:10 GMT
From:      Ana Kukec <anchie@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 126614 for review
Message-ID:  <200709200829.l8K8TA6h098278@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=126614

Change 126614 by anchie@anchie_malimis on 2007/09/20 08:28:13

	Virtualized structure with control options for Multicast Listener 
	Discovery outgoing packets. 

Affected files ...

.. //depot/projects/vimage/src/sys/netinet6/mld6.c#8 edit
.. //depot/projects/vimage/src/sys/netinet6/vinet6.h#13 edit

Differences ...

==== //depot/projects/vimage/src/sys/netinet6/mld6.c#8 (text+ko) ====

@@ -105,7 +105,9 @@
  */
 #define MLD_UNSOLICITED_REPORT_INTERVAL	10
 
+#ifndef VIMAGE
 static struct ip6_pktopts ip6_opts;
+#endif
 
 static void mld6_sendpkt(struct in6_multi *, int, const struct in6_addr *);
 static void mld_starttimer(struct in6_multi *);
@@ -116,6 +118,7 @@
 void
 mld6_init(void)
 {
+	INIT_VNET_INET6(curvnet);
 	static u_int8_t hbh_buf[8];
 	struct ip6_hbh *hbh = (struct ip6_hbh *)hbh_buf;
 	u_int16_t rtalert_code = htons((u_int16_t)IP6OPT_RTALERT_MLD);
@@ -130,8 +133,8 @@
 	hbh_buf[5] = IP6OPT_RTALERT_LEN - 2;
 	bcopy((caddr_t)&rtalert_code, &hbh_buf[6], sizeof(u_int16_t));
 
-	ip6_initpktopts(&ip6_opts);
-	ip6_opts.ip6po_hbh = hbh;
+	ip6_initpktopts(&V_ip6_opts);
+	V_ip6_opts.ip6po_hbh = hbh;
 }
 
 static void
@@ -518,7 +521,7 @@
 	/* increment output statictics */
 	V_icmp6stat.icp6s_outhist[type]++;
 
-	ip6_output(mh, &ip6_opts, NULL, 0, &im6o, &outif, NULL);
+	ip6_output(mh, &V_ip6_opts, NULL, 0, &im6o, &outif, NULL);
 	if (outif) {
 		icmp6_ifstat_inc(outif, ifs6_out_msg);
 		switch (type) {

==== //depot/projects/vimage/src/sys/netinet6/vinet6.h#13 (text+ko) ====

@@ -154,6 +154,8 @@
 
 	int				_ip6_temp_regen_advance;
 	int				_ip6_use_defzone;
+
+	struct ip6_pktopts		_ip6_opts;
 };
 #endif
 
@@ -263,4 +265,6 @@
 
 #define V_ip6_use_defzone		VNET_INET6(ip6_use_defzone)
 
+#define V_ip6_opts			VNET_INET6(ip6_opts)
+
 #endif /* !_NETINET6_VINET6_H_ */



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