diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2012-12-03 20:13:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-12-04 13:08:10 -0500 |
commit | d67b8c616b48df30e2836d797795f2420d109bc9 (patch) | |
tree | e06b3f77e905e789def714958fcd455c8b3c037b /net/ipv6/addrconf.c | |
parent | e8ad1a8fab6f550aba1f1fe7ba26749ff5460751 (diff) |
netconf: advertise mc_forwarding status
This patch advertise the MC_FORWARDING status for IPv4 and IPv6.
This field is readonly, only multicast engine in the kernel updates it.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 22ae75d54017..28e0e627229c 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -469,6 +469,8 @@ static int inet6_netconf_msgsize_devconf(int type) | |||
469 | /* type -1 is used for ALL */ | 469 | /* type -1 is used for ALL */ |
470 | if (type == -1 || type == NETCONFA_FORWARDING) | 470 | if (type == -1 || type == NETCONFA_FORWARDING) |
471 | size += nla_total_size(4); | 471 | size += nla_total_size(4); |
472 | if (type == -1 || type == NETCONFA_MC_FORWARDING) | ||
473 | size += nla_total_size(4); | ||
472 | 474 | ||
473 | return size; | 475 | return size; |
474 | } | 476 | } |
@@ -496,6 +498,10 @@ static int inet6_netconf_fill_devconf(struct sk_buff *skb, int ifindex, | |||
496 | if ((type == -1 || type == NETCONFA_FORWARDING) && | 498 | if ((type == -1 || type == NETCONFA_FORWARDING) && |
497 | nla_put_s32(skb, NETCONFA_FORWARDING, devconf->forwarding) < 0) | 499 | nla_put_s32(skb, NETCONFA_FORWARDING, devconf->forwarding) < 0) |
498 | goto nla_put_failure; | 500 | goto nla_put_failure; |
501 | if ((type == -1 || type == NETCONFA_MC_FORWARDING) && | ||
502 | nla_put_s32(skb, NETCONFA_MC_FORWARDING, | ||
503 | devconf->mc_forwarding) < 0) | ||
504 | goto nla_put_failure; | ||
499 | 505 | ||
500 | return nlmsg_end(skb, nlh); | 506 | return nlmsg_end(skb, nlh); |
501 | 507 | ||
@@ -504,8 +510,8 @@ nla_put_failure: | |||
504 | return -EMSGSIZE; | 510 | return -EMSGSIZE; |
505 | } | 511 | } |
506 | 512 | ||
507 | static void inet6_netconf_notify_devconf(struct net *net, int type, int ifindex, | 513 | void inet6_netconf_notify_devconf(struct net *net, int type, int ifindex, |
508 | struct ipv6_devconf *devconf) | 514 | struct ipv6_devconf *devconf) |
509 | { | 515 | { |
510 | struct sk_buff *skb; | 516 | struct sk_buff *skb; |
511 | int err = -ENOBUFS; | 517 | int err = -ENOBUFS; |