Fix netlink attribute handling
authorSteven Barth <steven@midlink.org>
Fri, 1 Feb 2013 11:26:51 +0000 (12:26 +0100)
committerSteven Barth <steven@midlink.org>
Fri, 1 Feb 2013 11:26:51 +0000 (12:26 +0100)
src/ra.c

index f1a5f7fdb5747d0160283adff8a2dc9c43db12b1..e32670ecbba0124b8629d6205df36fb07149ea93 100644 (file)
--- a/src/ra.c
+++ b/src/ra.c
@@ -157,7 +157,7 @@ bool ra_rtnl_process(void)
                        ssize_t alen = NLMSG_PAYLOAD(nh, sizeof(*ifa));
                        for (struct rtattr *rta = (struct rtattr*)&ifa[1]; RTA_OK(rta, alen);
                                        rta = RTA_NEXT(rta, alen))
-                               if (rta->rta_type == IFA_LOCAL && RTA_PAYLOAD(rta) >= sizeof(*addr))
+                               if (rta->rta_type == IFA_ADDRESS && RTA_PAYLOAD(rta) >= sizeof(*addr))
                                        addr = RTA_DATA(rta);
 
                        if (addr)