diff options
Diffstat (limited to 'security/selinux/netif.c')
| -rw-r--r-- | security/selinux/netif.c | 19 | 
1 files changed, 3 insertions, 16 deletions
diff --git a/security/selinux/netif.c b/security/selinux/netif.c index 694e9e43855f..50ce177d71a0 100644 --- a/security/selinux/netif.c +++ b/security/selinux/netif.c @@ -240,7 +240,7 @@ static void sel_netif_kill(int ifindex)   * Remove all entries from the network interface table.   *   */ -static void sel_netif_flush(void) +void sel_netif_flush(void)  {  	int idx;  	struct sel_netif *netif; @@ -252,15 +252,6 @@ static void sel_netif_flush(void)  	spin_unlock_bh(&sel_netif_lock);  } -static int sel_netif_avc_callback(u32 event) -{ -	if (event == AVC_CALLBACK_RESET) { -		sel_netif_flush(); -		synchronize_net(); -	} -	return 0; -} -  static int sel_netif_netdev_notifier_handler(struct notifier_block *this,  					     unsigned long event, void *ptr)  { @@ -281,7 +272,7 @@ static struct notifier_block sel_netif_netdev_notifier = {  static __init int sel_netif_init(void)  { -	int i, err; +	int i;  	if (!selinux_enabled)  		return 0; @@ -291,11 +282,7 @@ static __init int sel_netif_init(void)  	register_netdevice_notifier(&sel_netif_netdev_notifier); -	err = avc_add_callback(sel_netif_avc_callback, AVC_CALLBACK_RESET); -	if (err) -		panic("avc_add_callback() failed, error %d\n", err); - -	return err; +	return 0;  }  __initcall(sel_netif_init);  |