mac80211: disable ipv4/ipv6 address notifiers (fixes #13055)
authorFelix Fietkau <nbd@openwrt.org>
Sun, 24 Feb 2013 01:00:39 +0000 (01:00 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 24 Feb 2013 01:00:39 +0000 (01:00 +0000)
SVN-Revision: 35762

package/mac80211/patches/150-disable_addr_notifier.patch [new file with mode: 0644]

diff --git a/package/mac80211/patches/150-disable_addr_notifier.patch b/package/mac80211/patches/150-disable_addr_notifier.patch
new file mode 100644 (file)
index 0000000..d568a97
--- /dev/null
@@ -0,0 +1,67 @@
+--- a/net/mac80211/main.c
++++ b/net/mac80211/main.c
+@@ -313,7 +313,7 @@ void ieee80211_restart_hw(struct ieee802
+ }
+ EXPORT_SYMBOL(ieee80211_restart_hw);
+-#ifdef CONFIG_INET
++#ifdef __disabled__CONFIG_INET
+ static int ieee80211_ifa_changed(struct notifier_block *nb,
+                                unsigned long data, void *arg)
+ {
+@@ -372,7 +372,7 @@ static int ieee80211_ifa_changed(struct 
+ }
+ #endif
+-#if IS_ENABLED(CONFIG_IPV6)
++#if IS_ENABLED(__disabled__CONFIG_IPV6)
+ static int ieee80211_ifa6_changed(struct notifier_block *nb,
+                                 unsigned long data, void *arg)
+ {
+@@ -1015,14 +1015,14 @@ int ieee80211_register_hw(struct ieee802
+               goto fail_pm_qos;
+       }
+-#ifdef CONFIG_INET
++#ifdef __disabled__CONFIG_INET
+       local->ifa_notifier.notifier_call = ieee80211_ifa_changed;
+       result = register_inetaddr_notifier(&local->ifa_notifier);
+       if (result)
+               goto fail_ifa;
+ #endif
+-#if IS_ENABLED(CONFIG_IPV6)
++#if IS_ENABLED(__disabled__CONFIG_IPV6)
+       local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed;
+       result = register_inet6addr_notifier(&local->ifa6_notifier);
+       if (result)
+@@ -1034,13 +1034,13 @@ int ieee80211_register_hw(struct ieee802
+       return 0;
+-#if IS_ENABLED(CONFIG_IPV6)
++#if IS_ENABLED(__disabled__CONFIG_IPV6)
+  fail_ifa6:
+-#ifdef CONFIG_INET
++#ifdef __disabled__CONFIG_INET
+       unregister_inetaddr_notifier(&local->ifa_notifier);
+ #endif
+ #endif
+-#if defined(CONFIG_INET) || defined(CONFIG_IPV6)
++#if defined(__disabled__CONFIG_INET) || defined(__disabled__CONFIG_IPV6)
+  fail_ifa:
+       pm_qos_remove_notifier(PM_QOS_NETWORK_LATENCY,
+                              &local->network_latency_notifier);
+@@ -1073,10 +1073,10 @@ void ieee80211_unregister_hw(struct ieee
+       pm_qos_remove_notifier(PM_QOS_NETWORK_LATENCY,
+                              &local->network_latency_notifier);
+-#ifdef CONFIG_INET
++#ifdef __disabled__CONFIG_INET
+       unregister_inetaddr_notifier(&local->ifa_notifier);
+ #endif
+-#if IS_ENABLED(CONFIG_IPV6)
++#if IS_ENABLED(__disabled__CONFIG_IPV6)
+       unregister_inet6addr_notifier(&local->ifa6_notifier);
+ #endif