27a271e9da368606e21c2070367796376ebff53b
[openwrt/svn-archive/archive.git] / net / quagga / patches / 130-netlink_ignore_wireless.patch
1 diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
2 index 61b2505..e766259 100644
3 --- a/zebra/rt_netlink.c
4 +++ b/zebra/rt_netlink.c
5 @@ -487,6 +487,17 @@ netlink_interface (struct sockaddr_nl *snl, struct nlmsghdr *h)
6 /* Looking up interface name. */
7 memset (tb, 0, sizeof tb);
8 netlink_parse_rtattr (tb, IFLA_MAX, IFLA_RTA (ifi), len);
9 +
10 +#ifdef IFLA_WIRELESS
11 + /* check for wireless messages to ignore */
12 + if ((tb[IFLA_WIRELESS] != NULL) && (ifi->ifi_change == 0))
13 + {
14 + if (IS_ZEBRA_DEBUG_KERNEL)
15 + zlog_debug ("%s: ignoring IFLA_WIRELESS message", __func__);
16 + return 0;
17 + }
18 +#endif /* IFLA_WIRELESS */
19 +
20 if (tb[IFLA_IFNAME] == NULL)
21 return -1;
22 name = (char *) RTA_DATA (tb[IFLA_IFNAME]);
23 @@ -943,6 +954,17 @@ netlink_link_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
24 /* Looking up interface name. */
25 memset (tb, 0, sizeof tb);
26 netlink_parse_rtattr (tb, IFLA_MAX, IFLA_RTA (ifi), len);
27 +
28 +#ifdef IFLA_WIRELESS
29 + /* check for wireless messages to ignore */
30 + if ((tb[IFLA_WIRELESS] != NULL) && (ifi->ifi_change == 0))
31 + {
32 + if (IS_ZEBRA_DEBUG_KERNEL)
33 + zlog_debug ("%s: ignoring IFLA_WIRELESS message", __func__);
34 + return 0;
35 + }
36 +#endif /* IFLA_WIRELESS */
37 +
38 if (tb[IFLA_IFNAME] == NULL)
39 return -1;
40 name = (char *) RTA_DATA (tb[IFLA_IFNAME]);