diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-06-25 15:42:25 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-06-25 15:42:25 +0000 |
commit | 21aebee61844b2aad15c65819e3e1203c702aded (patch) | |
tree | 065b07d539f125a025dd07d802722a35f74cbff6 /sbin/route/route.c | |
parent | 017c8e3f78bd620e993ab1015602e934313c3b73 (diff) |
Add a missing RTM_VERSION check.
Tested and OK sthen@, OK henning@
Diffstat (limited to 'sbin/route/route.c')
-rw-r--r-- | sbin/route/route.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index c65ad4bc984..88af3f94a6e 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.133 2009/06/06 20:30:22 claudio Exp $ */ +/* $OpenBSD: route.c,v 1.134 2009/06/25 15:42:24 claudio Exp $ */ /* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */ /* @@ -1140,7 +1140,8 @@ rtmsg(int cmd, int flags, int fmask, u_char prio) if (cmd == RTM_GET) { do { l = read(s, &m_rtmsg, sizeof(m_rtmsg)); - } while (l > 0 && (rtm.rtm_seq != seq || rtm.rtm_pid != pid)); + } while (l > 0 && (rtm.rtm_version != RTM_VERSION || + rtm.rtm_seq != seq || rtm.rtm_pid != pid)); if (l == -1) warn("read from routing socket"); else |