[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1372376687.21767.10.camel@imac-linux.luckyscavenger.com>
Date: Thu, 27 Jun 2013 16:44:47 -0700
From: Sven-Thorsten Dietrich <sven@...tta.com>
To: LKML <linux-kernel@...r.kernel.org>
CC: Stephen Hemminger <shemminger@...tta.com>,
"nicolas.dichtel@...nd.com" <nicolas.dichtel@...nd.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Mike Davison <Mike.Davison@...tta.com>
Subject: [PATCH] Set the correct RTNL family for multicast netconf messages
There may be other cases that require a special case, so I chose the switch approach.
Please note, that all other messages from ipmr[6].c correctly set the family, while these do not.
Thanks
Sven
Subject: Set correct RTNL family for multicast netconf messages
From: Sven-Thorsten Dietrich sven@...tta.com Thu Jun 27 16:40:17 2013 -0700
Date: Thu Jun 27 16:40:17 2013 -0700:
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index dfc39d4..695858b 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1705,7 +1705,16 @@ static int inet_netconf_fill_devconf(struct sk_buff *skb, int ifindex,
return -EMSGSIZE;
ncm = nlmsg_data(nlh);
- ncm->ncm_family = AF_INET;
+
+ switch (type) {
+ case NETCONFA_MC_FORWARDING:
+ ncm->ncm_family = RTNL_FAMILY_IPMR;
+ break;
+
+ default:
+ ncm->ncm_family = AF_INET;
+ break;
+ }
if (nla_put_s32(skb, NETCONFA_IFINDEX, ifindex) < 0)
goto nla_put_failure;
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 4ab4c38..a177da4 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -492,7 +492,16 @@ static int inet6_netconf_fill_devconf(struct sk_buff *skb, int ifindex,
return -EMSGSIZE;
ncm = nlmsg_data(nlh);
- ncm->ncm_family = AF_INET6;
+
+ switch (type) {
+ case NETCONFA_MC_FORWARDING:
+ ncm->ncm_family = RTNL_FAMILY_IP6MR;
+ break;
+
+ default:
+ ncm->ncm_family = AF_INET6;
+ break;
+ }
if (nla_put_s32(skb, NETCONFA_IFINDEX, ifindex) < 0)
goto nla_put_failure;
Powered by blists - more mailing lists