diff options
author | 2009-06-25 15:44:43 +0000 | |
---|---|---|
committer | 2009-06-25 15:44:43 +0000 | |
commit | 35b77220f65d21da15f6345785584a26627e3b45 (patch) | |
tree | 87958cacbd8e4a69d167118098ceb6bfdeadb772 | |
parent | Same code as in route(8) same RTM_VERSION check missing. (diff) | |
download | wireguard-openbsd-35b77220f65d21da15f6345785584a26627e3b45.tar.xz wireguard-openbsd-35b77220f65d21da15f6345785584a26627e3b45.zip |
Another copy of the strange while loop seen in route(8). Add missing
RTM_VERSION check. Tested and OK sthen@, OK henning@
-rw-r--r-- | usr.sbin/ndp/ndp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index e77c5194803..965c6559ee0 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ndp.c,v 1.44 2009/06/17 15:31:23 claudio Exp $ */ +/* $OpenBSD: ndp.c,v 1.45 2009/06/25 15:44:43 claudio Exp $ */ /* $KAME: ndp.c,v 1.101 2002/07/17 08:46:33 itojun Exp $ */ /* @@ -898,7 +898,8 @@ doit: } do { l = read(s, (char *)&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 < 0) (void) fprintf(stderr, "ndp: read from routing socket: %s\n", strerror(errno)); |