]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Ignore unknown netlink events.
authorOndrej Zajicek <santiago@crfreenet.org>
Sun, 26 Oct 2008 22:20:50 +0000 (23:20 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Sun, 26 Oct 2008 22:20:50 +0000 (23:20 +0100)
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.

sysdep/linux/netlink/netlink.c

index a70428efe33d513c1fc84661a176655362d5c41d..4ab7fb1089ad682ea039be1c67e635ebb8afb30c 100644 (file)
@@ -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]);