summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorRainer Giedat <rainer@cvs.openbsd.org>2009-07-11 09:51:54 +0000
committerRainer Giedat <rainer@cvs.openbsd.org>2009-07-11 09:51:54 +0000
commit3fa08104b502af47e29baf206eb109d911c9f362 (patch)
treed58f6be1937ffa625c5addfb1608a1e6c7e9dad4 /usr.sbin
parent706a926a308c4c9b3bf86f5384c4957e6d44359d (diff)
fix the RTM_VERSION check in the evil loop to really get
all the interfaces ok sthen@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/rtadvd/if.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.sbin/rtadvd/if.c b/usr.sbin/rtadvd/if.c
index 511bf2a364b..3cd1932a9a6 100644
--- a/usr.sbin/rtadvd/if.c
+++ b/usr.sbin/rtadvd/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.21 2009/07/10 13:15:43 sthen Exp $ */
+/* $OpenBSD: if.c,v 1.22 2009/07/11 09:51:53 rainer Exp $ */
/* $KAME: if.c,v 1.17 2001/01/21 15:27:30 itojun Exp $ */
/*
@@ -498,13 +498,9 @@ parse_iflist(struct if_msghdr ***ifmlist_p, char *buf, size_t bufsize)
buf, lim, ifm);
return;
}
- if (ifm->ifm_version != RTM_VERSION) {
- ifm += ifm->ifm_msglen;
- continue;
- }
-
if (ifm->ifm_type == RTM_IFINFO) {
- (*ifmlist_p)[ifm->ifm_index] = ifm;
+ if (ifm->ifm_version == RTM_VERSION)
+ (*ifmlist_p)[ifm->ifm_index] = ifm;
} else {
log_warn("out of sync parsing NET_RT_IFLIST,"
" expected %d, got %d, msglen = %d,"