summaryrefslogtreecommitdiffstats
path: root/include/net/route.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-31 15:06:50 -0700
committerDavid S. Miller <davem@davemloft.net>2012-07-31 15:06:50 -0700
commitcaacf05e5ad1abf0a2864863da4e33024bc68ec6 (patch)
tree9a82e97a072e288f604bd3dbbe07e1796581fad0 /include/net/route.h
parentc5038a8327b980a5b279fa193163c468011de009 (diff)
downloadop-kernel-dev-caacf05e5ad1abf0a2864863da4e33024bc68ec6.zip
op-kernel-dev-caacf05e5ad1abf0a2864863da4e33024bc68ec6.tar.gz
ipv4: Properly purge netdev references on uncached routes.
When a device is unregistered, we have to purge all of the references to it that may exist in the entire system. If a route is uncached, we currently have no way of accomplishing this. So create a global list that is scanned when a network device goes down. This mirrors the logic in net/core/dst.c's dst_ifdown(). Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/route.h')
-rw-r--r--include/net/route.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/route.h b/include/net/route.h
index 8c52bc6..776a27f 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -57,6 +57,8 @@ struct rtable {
/* Miscellaneous cached information */
u32 rt_pmtu;
+
+ struct list_head rt_uncached;
};
static inline bool rt_is_input_route(const struct rtable *rt)
@@ -107,6 +109,7 @@ extern struct ip_rt_acct __percpu *ip_rt_acct;
struct in_device;
extern int ip_rt_init(void);
extern void rt_cache_flush(struct net *net, int how);
+extern void rt_flush_dev(struct net_device *dev);
extern struct rtable *__ip_route_output_key(struct net *, struct flowi4 *flp);
extern struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp,
struct sock *sk);
OpenPOWER on IntegriCloud