mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-18 15:09:53 +00:00
3b87956ea6
This fixes hang when target device of mirred packet classifier action is removed. If a mirror or redirection action is configured to cause packets to go to another device, the classifier holds a ref count, but was assuming the adminstrator cleaned up all redirections before removing. The fix is to add a notifier and cleanup during unregister. The new list is implicitly protected by RTNL mutex because it is held during filter add/delete as well as notifier. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
18 lines
343 B
C
18 lines
343 B
C
#ifndef __NET_TC_MIR_H
|
|
#define __NET_TC_MIR_H
|
|
|
|
#include <net/act_api.h>
|
|
|
|
struct tcf_mirred {
|
|
struct tcf_common common;
|
|
int tcfm_eaction;
|
|
int tcfm_ifindex;
|
|
int tcfm_ok_push;
|
|
struct net_device *tcfm_dev;
|
|
struct list_head tcfm_list;
|
|
};
|
|
#define to_mirred(pc) \
|
|
container_of(pc, struct tcf_mirred, common)
|
|
|
|
#endif /* __NET_TC_MIR_H */
|