From patchwork Tue Dec 4 19:47:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [net-next:master, 153/162] net/ipv6/addrconf.c:503:11: error: 'struct ipv6_devconf' has no member named 'mc_forwarding' Date: Tue, 04 Dec 2012 09:47:02 -0000 From: David Miller X-Patchwork-Id: 203731 Message-Id: <20121204.144702.1067637950249633761.davem@davemloft.net> To: fengguang.wu@intel.com Cc: nicolas.dichtel@6wind.com, netdev@vger.kernel.org Thanks, fixed as follows: -------------------- [PATCH] ipv6: Protect ->mc_forwarding access with CONFIG_IPV6_MROUTE Reported-by: Fengguang Wu Signed-off-by: David S. Miller Acked-by: Nicolas Dichtel --- net/ipv6/addrconf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 28e0e62..6fca01f 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -469,8 +469,10 @@ static int inet6_netconf_msgsize_devconf(int type) /* type -1 is used for ALL */ if (type == -1 || type == NETCONFA_FORWARDING) size += nla_total_size(4); +#ifdef CONFIG_IPV6_MROUTE if (type == -1 || type == NETCONFA_MC_FORWARDING) size += nla_total_size(4); +#endif return size; } @@ -498,11 +500,12 @@ static int inet6_netconf_fill_devconf(struct sk_buff *skb, int ifindex, if ((type == -1 || type == NETCONFA_FORWARDING) && nla_put_s32(skb, NETCONFA_FORWARDING, devconf->forwarding) < 0) goto nla_put_failure; +#ifdef CONFIG_IPV6_MROUTE if ((type == -1 || type == NETCONFA_MC_FORWARDING) && nla_put_s32(skb, NETCONFA_MC_FORWARDING, devconf->mc_forwarding) < 0) goto nla_put_failure; - +#endif return nlmsg_end(skb, nlh); nla_put_failure: