diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-06-26 09:44:56 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-06-26 09:44:56 +0000 |
commit | 8edaa7cce5bfd08b5b8d13dd6510aae8b76a7849 (patch) | |
tree | 28701d66e5f46db5e3218801a1c8abd3fe9cdc35 /usr.sbin/rwhod/rwhod.c | |
parent | 5d2b077d953cadea7854d5665f7ac1b14dc9c6cd (diff) |
Another daemon needing RTM_VERSION checks. Why rwhod is doing all the hard
work instead of using getifaddrs() and working on this much simpler structure
is beyond my immagination. Looked over by henning@ and sthen@
Diffstat (limited to 'usr.sbin/rwhod/rwhod.c')
-rw-r--r-- | usr.sbin/rwhod/rwhod.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c index 38ad526f53d..fc57baa63c8 100644 --- a/usr.sbin/rwhod/rwhod.c +++ b/usr.sbin/rwhod/rwhod.c @@ -35,7 +35,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "@(#)rwhod.c 8.1 (Berkeley) 6/6/93";*/ -static char rcsid[] = "$OpenBSD: rwhod.c,v 1.31 2006/01/02 16:29:53 millert Exp $"; +static char rcsid[] = "$OpenBSD: rwhod.c,v 1.32 2009/06/26 09:44:55 claudio Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -500,6 +500,8 @@ configure(void) sdl = NULL; /* XXX just to keep gcc -Wall happy */ for (next = buf; next < lim; next += ifm->ifm_msglen) { ifm = (struct if_msghdr *)next; + if (ifm->ifm_version != RTM_VERSION) + continue; if (ifm->ifm_type == RTM_IFINFO) { sdl = (struct sockaddr_dl *)(ifm + 1); flags = ifm->ifm_flags; |