summaryrefslogtreecommitdiffstats
path: root/sysdep
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2008-10-26 23:20:50 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2008-10-26 23:20:50 +0100
commitd7f3b306495327e76aa9ae381c6c7575104e0e24 (patch)
tree39e60ed5a1969d1919e73211b6f5d1f55fae02b7 /sysdep
parent44cb1449edec6a80e063981a955e8025ee87ea65 (diff)
downloadbird-d7f3b306495327e76aa9ae381c6c7575104e0e24.tar
bird-d7f3b306495327e76aa9ae381c6c7575104e0e24.zip
Ignore unknown netlink events.
Bird sometimes reported 'bird: nl_parse_link: Malformed message received'. The cause is that bird asynchronously received netlink packet from wireless driver about some wireless event on its link layer. In that case bird shouldn't complain.
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/linux/netlink/netlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdep/linux/netlink/netlink.c b/sysdep/linux/netlink/netlink.c
index a70428e..4ab7fb1 100644
--- a/sysdep/linux/netlink/netlink.c
+++ b/sysdep/linux/netlink/netlink.c
@@ -268,7 +268,8 @@ nl_parse_link(struct nlmsghdr *h, int scan)
if (!a[IFLA_IFNAME] || RTA_PAYLOAD(a[IFLA_IFNAME]) < 2 ||
!a[IFLA_MTU] || RTA_PAYLOAD(a[IFLA_MTU]) != 4)
{
- log(L_ERR "nl_parse_link: Malformed message received");
+ if (scan)
+ log(L_ERR "nl_parse_link: Malformed message received");
return;
}
name = RTA_DATA(a[IFLA_IFNAME]);