Renamed patches to keep their original numbering from codelinaro.org Fixed minor bugs and added support for the qca-nss-drv-l2tpv2 module
67 lines
1.8 KiB
Diff
67 lines
1.8 KiB
Diff
From 1667939d350f5b0db4d82df3efcef249fa5404db Mon Sep 17 00:00:00 2001
|
|
From: Murat Sezgin <msezgin@codeaurora.org>
|
|
Date: Wed, 5 Aug 2020 13:21:27 -0700
|
|
Subject: [PATCH 146/500] net:ipv6: Fix IPv6 user route change event calls
|
|
|
|
These events should be called only when the route table is
|
|
changed by the userspace. So, we should call them in the
|
|
ioctl and the netlink message handler function.
|
|
|
|
Change-Id: If7ec615014cfc79d5fa72878e49eaf99c2560c32
|
|
Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
|
|
---
|
|
net/ipv6/route.c | 24 ++++++++++++++++++++----
|
|
1 file changed, 20 insertions(+), 4 deletions(-)
|
|
|
|
--- a/net/ipv6/route.c
|
|
+++ b/net/ipv6/route.c
|
|
@@ -4502,6 +4502,10 @@ int ipv6_route_ioctl(struct net *net, un
|
|
break;
|
|
}
|
|
rtnl_unlock();
|
|
+ if (!err)
|
|
+ atomic_notifier_call_chain(&ip6route_chain,
|
|
+ (cmd == SIOCADDRT) ? RTM_NEWROUTE : RTM_DELROUTE, &cfg);
|
|
+
|
|
return err;
|
|
}
|
|
|
|
@@ -5524,11 +5528,17 @@ static int inet6_rtm_delroute(struct sk_
|
|
}
|
|
|
|
if (cfg.fc_mp)
|
|
- return ip6_route_multipath_del(&cfg, extack);
|
|
+ err = ip6_route_multipath_del(&cfg, extack);
|
|
else {
|
|
cfg.fc_delete_all_nh = 1;
|
|
- return ip6_route_del(&cfg, extack);
|
|
+ err = ip6_route_del(&cfg, extack);
|
|
}
|
|
+
|
|
+ if (!err)
|
|
+ atomic_notifier_call_chain(&ip6route_chain,
|
|
+ RTM_DELROUTE, &cfg);
|
|
+
|
|
+ return err;
|
|
}
|
|
|
|
static int inet6_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh,
|
|
@@ -5545,9 +5555,15 @@ static int inet6_rtm_newroute(struct sk_
|
|
cfg.fc_metric = IP6_RT_PRIO_USER;
|
|
|
|
if (cfg.fc_mp)
|
|
- return ip6_route_multipath_add(&cfg, extack);
|
|
+ err = ip6_route_multipath_add(&cfg, extack);
|
|
else
|
|
- return ip6_route_add(&cfg, GFP_KERNEL, extack);
|
|
+ err = ip6_route_add(&cfg, GFP_KERNEL, extack);
|
|
+
|
|
+ if (!err)
|
|
+ atomic_notifier_call_chain(&ip6route_chain,
|
|
+ RTM_NEWROUTE, &cfg);
|
|
+
|
|
+ return err;
|
|
}
|
|
|
|
/* add the overhead of this fib6_nh to nexthop_len */
|