]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
netlink: fix IP address discovery
authorVincent Bernat <bernat@luffy.cx>
Fri, 3 May 2013 19:19:21 +0000 (21:19 +0200)
committerVincent Bernat <bernat@luffy.cx>
Fri, 3 May 2013 19:19:21 +0000 (21:19 +0200)
Since the switch to Netlink, the IP address was not advertised
correctly. Fix `netlink_send()`. Patch courtesy of Pradosh Mohapatra
from Cumulus Networks.

NEWS
src/daemon/netlink.c

diff --git a/NEWS b/NEWS
index 795e6396f55c7d27f54300047aab87d21dec0ad5..e542518ff3dbdccdad4392ea3988146a64388248 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+lldpd (0.7.3)
+  * Fixes:
+    + Fix IPv4/IPv6 address discovery in Linux.
+
 lldpd (0.7.2)
   * Features
     + lldpd can be configured through /etc/lldpd.conf and
index 439483ceb02dbdea1cc43e7dedcfca924d57831e..1f0611fb145c0864ef490b6e8110be2732299ae8 100644 (file)
@@ -85,11 +85,11 @@ netlink_send(int s, int type, int family)
     struct netlink_req req = {
         .hdr = {
             .nlmsg_len = NLMSG_LENGTH(sizeof(struct rtgenmsg)),
-            .nlmsg_type = RTM_GETLINK,
+            .nlmsg_type = type,
             .nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP,
             .nlmsg_seq = 1,
             .nlmsg_pid = getpid() },
-        .gen = { .rtgen_family = AF_PACKET }
+        .gen = { .rtgen_family = family }
     };
     struct iovec iov = {
         .iov_base = &req,