From owner-p4-projects@FreeBSD.ORG Thu Sep 20 08:29:11 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8AC5716A41B; Thu, 20 Sep 2007 08:29:11 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BB3E16A418 for ; Thu, 20 Sep 2007 08:29:11 +0000 (UTC) (envelope-from anchie@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ED12613C4D9 for ; Thu, 20 Sep 2007 08:29:10 +0000 (UTC) (envelope-from anchie@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8K8TAge098282 for ; Thu, 20 Sep 2007 08:29:10 GMT (envelope-from anchie@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8K8TA6h098278 for perforce@freebsd.org; Thu, 20 Sep 2007 08:29:10 GMT (envelope-from anchie@FreeBSD.org) Date: Thu, 20 Sep 2007 08:29:10 GMT Message-Id: <200709200829.l8K8TA6h098278@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to anchie@FreeBSD.org using -f From: Ana Kukec To: Perforce Change Reviews Cc: Subject: PERFORCE change 126614 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2007 08:29:11 -0000 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_ */