diff options
author | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2005-06-01 11:22:08 +0000 |
---|---|---|
committer | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2005-06-01 11:22:08 +0000 |
commit | 799737fd8ce31a2bb76f74069a693783d84534f8 (patch) | |
tree | fdc47f1874dd56a9359eb561cb6cebf5ff84c2c4 | |
parent | e1a83f8eb6967b26b64bd3e71d0003a3dbd22004 (diff) |
when dumping policies, skip those attached to a socket.
ok ho
-rw-r--r-- | sys/net/pfkeyv2.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c index 189882f58e2..c1a563bc691 100644 --- a/sys/net/pfkeyv2.c +++ b/sys/net/pfkeyv2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2.c,v 1.107 2005/05/28 17:43:25 hshoexer Exp $ */ +/* $OpenBSD: pfkeyv2.c,v 1.108 2005/06/01 11:22:07 hshoexer Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) 17 January 1995 @@ -2370,6 +2370,10 @@ pfkeyv2_sysctl_policydumper(struct ipsec_policy *ipo, void *arg) void *buffer = 0; int i, buflen, error = 0; + /* Do not dump policies attached to a socket. */ + if (ipo->ipo_flags & IPSP_POLICY_SOCKET) + return (0); + if (w->w_where) { void *headers[SADB_EXT_MAX + 1]; struct sadb_msg msg; |