aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vrf.c
diff options
context:
space:
mode:
authorPatrick Ruddy <pruddy@vyatta.att-mail.com>2018-10-01 09:41:27 +0100
committerDavid S. Miller <davem@davemloft.net>2018-10-02 22:29:08 -0700
commite4a38c0c4b2761b2b6bc9d64352f1dc6f8402eee (patch)
treeda0504fc2e1350b74588e4a02449446c6c2dc24a /drivers/net/vrf.c
parentipv4: Allow sending multicast packets on specific i/f using VRF socket (diff)
downloadlinux-dev-e4a38c0c4b2761b2b6bc9d64352f1dc6f8402eee.tar.xz
linux-dev-e4a38c0c4b2761b2b6bc9d64352f1dc6f8402eee.zip
ipv6: add vrf table handling code for ipv6 mcast
The code to obtain the correct table for the incoming interface was missing for IPv6. This has been added along with the table creation notification to fib rules for the RTNL_FAMILY_IP6MR address family. Signed-off-by: Patrick Ruddy <pruddy@vyatta.att-mail.com> Signed-off-by: Mike Manning <mmanning@vyatta.att-mail.com> Reviewed-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vrf.c')
-rw-r--r--drivers/net/vrf.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index f93547f257fb..69b7227c637e 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -1215,8 +1215,19 @@ static int vrf_add_fib_rules(const struct net_device *dev)
goto ipmr_err;
#endif
+#if IS_ENABLED(CONFIG_IPV6_MROUTE_MULTIPLE_TABLES)
+ err = vrf_fib_rule(dev, RTNL_FAMILY_IP6MR, true);
+ if (err < 0)
+ goto ip6mr_err;
+#endif
+
return 0;
+#if IS_ENABLED(CONFIG_IPV6_MROUTE_MULTIPLE_TABLES)
+ip6mr_err:
+ vrf_fib_rule(dev, RTNL_FAMILY_IPMR, false);
+#endif
+
#if IS_ENABLED(CONFIG_IP_MROUTE_MULTIPLE_TABLES)
ipmr_err:
vrf_fib_rule(dev, AF_INET6, false);