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>
This commit is contained in:

committed by
David S. Miller

parent
e8ad1a8fab
commit
d67b8c616b
@@ -469,6 +469,8 @@ 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);
|
||||
if (type == -1 || type == NETCONFA_MC_FORWARDING)
|
||||
size += nla_total_size(4);
|
||||
|
||||
return size;
|
||||
}
|
||||
@@ -496,6 +498,10 @@ 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;
|
||||
if ((type == -1 || type == NETCONFA_MC_FORWARDING) &&
|
||||
nla_put_s32(skb, NETCONFA_MC_FORWARDING,
|
||||
devconf->mc_forwarding) < 0)
|
||||
goto nla_put_failure;
|
||||
|
||||
return nlmsg_end(skb, nlh);
|
||||
|
||||
@@ -504,8 +510,8 @@ nla_put_failure:
|
||||
return -EMSGSIZE;
|
||||
}
|
||||
|
||||
static void inet6_netconf_notify_devconf(struct net *net, int type, int ifindex,
|
||||
struct ipv6_devconf *devconf)
|
||||
void inet6_netconf_notify_devconf(struct net *net, int type, int ifindex,
|
||||
struct ipv6_devconf *devconf)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
int err = -ENOBUFS;
|
||||
|
Reference in New Issue
Block a user