summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHakan Olsson <ho@cvs.openbsd.org>2005-05-24 03:13:54 +0000
committerHakan Olsson <ho@cvs.openbsd.org>2005-05-24 03:13:54 +0000
commitb6f18ca31883269bbfdeeb0e8edbcd8b57a15a30 (patch)
tree2f9ba036d78d83997993dd467d474d68ff62748c /sys
parent2b07327e54484e9b9a0db7cfa18b2b02f6718a0a (diff)
Make sure all fields in the SADB_DUMP header are zeroed properly. hshoexer@ ok.
Diffstat (limited to 'sys')
-rw-r--r--sys/net/pfkeyv2.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c
index fc503aaccaf..770c301048a 100644
--- a/sys/net/pfkeyv2.c
+++ b/sys/net/pfkeyv2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkeyv2.c,v 1.102 2005/05/10 13:42:11 markus Exp $ */
+/* $OpenBSD: pfkeyv2.c,v 1.103 2005/05/24 03:13:53 ho Exp $ */
/*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
@@ -2178,9 +2178,8 @@ pfkeyv2_sysctl_walker(struct tdb *sa, void *arg, int last)
goto done;
}
/* prepend header */
+ bzero(&msg, sizeof(msg));
msg.sadb_msg_version = PF_KEY_V2;
- msg.sadb_msg_pid = 0;
- msg.sadb_msg_seq = 0;
msg.sadb_msg_satype = sa->tdb_satype;
msg.sadb_msg_type = SADB_DUMP;
msg.sadb_msg_len = (sizeof(msg) + buflen) / sizeof(uint64_t);