summaryrefslogtreecommitdiffhomepage
path: root/src/odhcpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/odhcpd.c')
-rw-r--r--src/odhcpd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/odhcpd.c b/src/odhcpd.c
index 25a6047..bf9f16d 100644
--- a/src/odhcpd.c
+++ b/src/odhcpd.c
@@ -217,7 +217,7 @@ ssize_t odhcpd_get_interface_addresses(int ifindex,
struct ifaddrmsg *ifa = NLMSG_DATA(nhm);
if (ifa->ifa_scope != RT_SCOPE_UNIVERSE ||
- ifa->ifa_index != (unsigned)ifindex)
+ (ifindex && ifa->ifa_index != (unsigned)ifindex))
continue;
struct rtattr *rta = (struct rtattr*)&ifa[1];