aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-31 18:06:50 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-31 18:06:50 -0400
commitcaacf05e5ad1abf0a2864863da4e33024bc68ec6 (patch)
tree9a82e97a072e288f604bd3dbbe07e1796581fad0 /include/net
parentc5038a8327b980a5b279fa193163c468011de009 (diff)
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')
-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 8c52bc6f1c9..776a27f1ab7 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -57,6 +57,8 @@ struct rtable {
57 57
58 /* Miscellaneous cached information */ 58 /* Miscellaneous cached information */
59 u32 rt_pmtu; 59 u32 rt_pmtu;
60
61 struct list_head rt_uncached;
60}; 62};
61 63
62static inline bool rt_is_input_route(const struct rtable *rt) 64static inline bool rt_is_input_route(const struct rtable *rt)
@@ -107,6 +109,7 @@ extern struct ip_rt_acct __percpu *ip_rt_acct;
107struct in_device; 109struct in_device;
108extern int ip_rt_init(void); 110extern int ip_rt_init(void);
109extern void rt_cache_flush(struct net *net, int how); 111extern void rt_cache_flush(struct net *net, int how);
112extern void rt_flush_dev(struct net_device *dev);
110extern struct rtable *__ip_route_output_key(struct net *, struct flowi4 *flp); 113extern struct rtable *__ip_route_output_key(struct net *, struct flowi4 *flp);
111extern struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp, 114extern struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp,
112 struct sock *sk); 115 struct sock *sk);