summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sysdep/linux/netlink.c6
-rw-r--r--sysdep/unix/krt.c2
-rw-r--r--sysdep/unix/krt.h2
3 files changed, 7 insertions, 3 deletions
diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c
index f2f60100..efbf41a6 100644
--- a/sysdep/linux/netlink.c
+++ b/sysdep/linux/netlink.c
@@ -1116,12 +1116,14 @@ nl_async_msg(struct nlmsghdr *h)
case RTM_NEWLINK:
case RTM_DELLINK:
DBG("KRT: Received async link notification (%d)\n", h->nlmsg_type);
- nl_parse_link(h, 0);
+ if (kif_proto)
+ nl_parse_link(h, 0);
break;
case RTM_NEWADDR:
case RTM_DELADDR:
DBG("KRT: Received async address notification (%d)\n", h->nlmsg_type);
- nl_parse_addr(h, 0);
+ if (kif_proto)
+ nl_parse_addr(h, 0);
break;
default:
DBG("KRT: Received unknown async notification (%d)\n", h->nlmsg_type);
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c
index 49bf9519..5e78586b 100644
--- a/sysdep/unix/krt.c
+++ b/sysdep/unix/krt.c
@@ -84,8 +84,8 @@ krt_io_init(void)
* Interfaces
*/
+struct kif_proto *kif_proto;
static struct kif_config *kif_cf;
-static struct kif_proto *kif_proto;
static timer *kif_scan_timer;
static bird_clock_t kif_last_shot;
diff --git a/sysdep/unix/krt.h b/sysdep/unix/krt.h
index aea20102..d4a8717e 100644
--- a/sysdep/unix/krt.h
+++ b/sysdep/unix/krt.h
@@ -112,6 +112,8 @@ struct kif_proto {
struct kif_state sys; /* Sysdep state */
};
+struct kif_proto *kif_proto;
+
#define KIF_CF ((struct kif_config *)p->p.cf)
struct proto_config * krt_init_config(int class);