diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-06-25 15:40:56 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-06-25 15:40:56 +0000 |
commit | 017c8e3f78bd620e993ab1015602e934313c3b73 (patch) | |
tree | 3ee21cf41541b3fb08ff6c31a17e0916baac7dde /sbin/isakmpd/util.c | |
parent | 0065e0d3574b4915556cf83a3ab7ee8c13b9f266 (diff) |
Add missing RTM_VERSION check. This is needed before accessing other data
from routing messages retrieved via routing socket or sysctl.
Tested and OK sthen@, OK henning@
Diffstat (limited to 'sbin/isakmpd/util.c')
-rw-r--r-- | sbin/isakmpd/util.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/isakmpd/util.c b/sbin/isakmpd/util.c index 95cc54ca077..61bc82e03db 100644 --- a/sbin/isakmpd/util.c +++ b/sbin/isakmpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.64 2009/06/05 22:40:23 chris Exp $ */ +/* $OpenBSD: util.c,v 1.65 2009/06/25 15:40:55 claudio Exp $ */ /* $EOM: util.c,v 1.23 2000/11/23 12:22:08 niklas Exp $ */ /* @@ -310,6 +310,8 @@ text2sockaddr(char *address, char *port, struct sockaddr **sa, sa_family_t af, close(fd); return -1; } + if (rtm->rtm_version != RTM_VERSION) + continue; if (rtm->rtm_type == RTM_GET && rtm->rtm_pid == pid && |