From 934f6e26ea87e04769010498121f2a0be86d9b68 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 3 Jul 2013 14:06:19 +0200 Subject: break the loop if we are finished --- netlink-notify.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netlink-notify.c b/netlink-notify.c index 6444879..88e8d83 100644 --- a/netlink-notify.c +++ b/netlink-notify.c @@ -298,6 +298,9 @@ static int msg_handler (struct sockaddr_nl *nl, struct nlmsghdr *msg) { && ifa->ifa_scope == RT_SCOPE_UNIVERSE /* no IPv6 scope link */) { inet_ntop(ifa->ifa_family, RTA_DATA (rth), buf, sizeof(buf)); remove_address(&addresses_seen[ifi->ifi_index], buf, ifa->ifa_prefixlen); + + /* we are done, no need to run more loops */ + break; } rth = RTA_NEXT (rth, rtl); } -- cgit v1.2.3-54-g00ecf