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>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user