From f642786b3fcf19d70b0e04ecae08ea4d562f1682 Mon Sep 17 00:00:00 2001 From: jow Date: Thu, 7 May 2009 13:40:30 +0000 Subject: [PATCH] [Quagga] Ignore wireless netlink messages This patch fixes a bug where zebra terminates randomly with SIGABRT. The problem originates from zebra trying to parse wireless netlink messages. The following patch makes zebra ignore these messages. Signed-off-by: Acinonyx git-svn-id: svn://svn.openwrt.org/openwrt@15676 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- patches/130-netlink_ignore_wireless.patch | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 patches/130-netlink_ignore_wireless.patch diff --git a/patches/130-netlink_ignore_wireless.patch b/patches/130-netlink_ignore_wireless.patch new file mode 100644 index 0000000..27a271e --- /dev/null +++ b/patches/130-netlink_ignore_wireless.patch @@ -0,0 +1,40 @@ +diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c +index 61b2505..e766259 100644 +--- a/zebra/rt_netlink.c ++++ b/zebra/rt_netlink.c +@@ -487,6 +487,17 @@ netlink_interface (struct sockaddr_nl *snl, struct nlmsghdr *h) + /* Looking up interface name. */ + memset (tb, 0, sizeof tb); + netlink_parse_rtattr (tb, IFLA_MAX, IFLA_RTA (ifi), len); ++ ++#ifdef IFLA_WIRELESS ++ /* check for wireless messages to ignore */ ++ if ((tb[IFLA_WIRELESS] != NULL) && (ifi->ifi_change == 0)) ++ { ++ if (IS_ZEBRA_DEBUG_KERNEL) ++ zlog_debug ("%s: ignoring IFLA_WIRELESS message", __func__); ++ return 0; ++ } ++#endif /* IFLA_WIRELESS */ ++ + if (tb[IFLA_IFNAME] == NULL) + return -1; + name = (char *) RTA_DATA (tb[IFLA_IFNAME]); +@@ -943,6 +954,17 @@ netlink_link_change (struct sockaddr_nl *snl, struct nlmsghdr *h) + /* Looking up interface name. */ + memset (tb, 0, sizeof tb); + netlink_parse_rtattr (tb, IFLA_MAX, IFLA_RTA (ifi), len); ++ ++#ifdef IFLA_WIRELESS ++ /* check for wireless messages to ignore */ ++ if ((tb[IFLA_WIRELESS] != NULL) && (ifi->ifi_change == 0)) ++ { ++ if (IS_ZEBRA_DEBUG_KERNEL) ++ zlog_debug ("%s: ignoring IFLA_WIRELESS message", __func__); ++ return 0; ++ } ++#endif /* IFLA_WIRELESS */ ++ + if (tb[IFLA_IFNAME] == NULL) + return -1; + name = (char *) RTA_DATA (tb[IFLA_IFNAME]); -- 2.30.2