From 87a9abeac976180ade1c7619545e610d743994b5 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Fri, 21 May 2010 15:17:49 +0200 Subject: [PATCH] Fixes interface scan on Linux 2.4.x in IPv6 mode. --- sysdep/linux/netlink/netlink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdep/linux/netlink/netlink.c b/sysdep/linux/netlink/netlink.c index 72f06cc2..365d4a95 100644 --- a/sysdep/linux/netlink/netlink.c +++ b/sysdep/linux/netlink/netlink.c @@ -98,7 +98,9 @@ nl_request_dump(int cmd) req.nh.nlmsg_type = cmd; req.nh.nlmsg_len = sizeof(req); req.nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP; - req.g.rtgen_family = BIRD_PF; + /* Is it important which PF_* is used for link-level interface scan? + It seems that some information is available only when PF_INET is used. */ + req.g.rtgen_family = (cmd == RTM_GETLINK) ? PF_INET : BIRD_PF; nl_send(&nl_scan, &req.nh); }