summaryrefslogtreecommitdiff
path: root/usr.sbin/rtadvd
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2009-07-10 13:15:44 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2009-07-10 13:15:44 +0000
commit012e9501d4a26f9440830d8435192d9a09228090 (patch)
treec19d08d65665644f1e856f224bda538988b4ceda /usr.sbin/rtadvd
parent224ca3a3acc4d039366468f4646ad9e1221cbcf5 (diff)
Advance the pointer past the message on the routing socket where
ifm_version is not RTM_VERSION - the for() loop doesn't do this itself. Fixes endless loop introduced by preceding commit, noticed by marc@. ok claudio.
Diffstat (limited to 'usr.sbin/rtadvd')
-rw-r--r--usr.sbin/rtadvd/if.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/rtadvd/if.c b/usr.sbin/rtadvd/if.c
index 34c5bf81258..511bf2a364b 100644
--- a/usr.sbin/rtadvd/if.c
+++ b/usr.sbin/rtadvd/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.20 2009/07/07 20:58:47 claudio Exp $ */
+/* $OpenBSD: if.c,v 1.21 2009/07/10 13:15:43 sthen Exp $ */
/* $KAME: if.c,v 1.17 2001/01/21 15:27:30 itojun Exp $ */
/*
@@ -498,8 +498,10 @@ parse_iflist(struct if_msghdr ***ifmlist_p, char *buf, size_t bufsize)
buf, lim, ifm);
return;
}
- if (ifm->ifm_version != RTM_VERSION)
+ if (ifm->ifm_version != RTM_VERSION) {
+ ifm += ifm->ifm_msglen;
continue;
+ }
if (ifm->ifm_type == RTM_IFINFO) {
(*ifmlist_p)[ifm->ifm_index] = ifm;