summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhshoexer <hshoexer@openbsd.org>2006-06-01 15:47:26 +0000
committerhshoexer <hshoexer@openbsd.org>2006-06-01 15:47:26 +0000
commitb5d70521c6ee1fe8f1ea3ace478af30ecb43a03e (patch)
treefb39eed6772416cd19482e4985a27e16326601d4
parentprint actual key size when warning about the wrong key size; ok hshoexer (diff)
downloadwireguard-openbsd-b5d70521c6ee1fe8f1ea3ace478af30ecb43a03e.tar.xz
wireguard-openbsd-b5d70521c6ee1fe8f1ea3ace478af30ecb43a03e.zip
Prepare for SA grouping.
-rw-r--r--sbin/ipsecctl/ipsecctl.c3
-rw-r--r--sbin/ipsecctl/ipsecctl.h10
2 files changed, 11 insertions, 2 deletions
diff --git a/sbin/ipsecctl/ipsecctl.c b/sbin/ipsecctl/ipsecctl.c
index 0f0e34281ef..bfc8e35d876 100644
--- a/sbin/ipsecctl/ipsecctl.c
+++ b/sbin/ipsecctl/ipsecctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsecctl.c,v 1.50 2006/06/01 06:20:30 todd Exp $ */
+/* $OpenBSD: ipsecctl.c,v 1.51 2006/06/01 15:47:26 hshoexer Exp $ */
/*
* Copyright (c) 2004, 2005 Hans-Joerg Hoexer <hshoexer@openbsd.org>
*
@@ -87,6 +87,7 @@ ipsecctl_rules(char *filename, int opts)
bzero(&ipsec, sizeof(ipsec));
ipsec.opts = opts;
TAILQ_INIT(&ipsec.rule_queue);
+ TAILQ_INIT(&ipsec.group_queue);
if (strcmp(filename, "-") == 0) {
fin = stdin;
diff --git a/sbin/ipsecctl/ipsecctl.h b/sbin/ipsecctl/ipsecctl.h
index c0353c69afb..81608a8f6d8 100644
--- a/sbin/ipsecctl/ipsecctl.h
+++ b/sbin/ipsecctl/ipsecctl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsecctl.h,v 1.39 2006/06/01 04:12:34 hshoexer Exp $ */
+/* $OpenBSD: ipsecctl.h,v 1.40 2006/06/01 15:47:26 hshoexer Exp $ */
/*
* Copyright (c) 2004, 2005 Hans-Joerg Hoexer <hshoexer@openbsd.org>
*
@@ -136,6 +136,8 @@ struct ipsec_transforms {
extern const struct ipsec_xf authxfs[];
extern const struct ipsec_xf encxfs[];
+TAILQ_HEAD(dst_group_queue, ipsec_rule);
+
/* Complete state of one rule. */
struct ipsec_rule {
u_int8_t type;
@@ -162,14 +164,20 @@ struct ipsec_rule {
u_int32_t nr;
TAILQ_ENTRY(ipsec_rule) rule_entry;
+ TAILQ_ENTRY(ipsec_rule) group_entry;
+ TAILQ_ENTRY(ipsec_rule) dst_group_entry;
+
+ struct dst_group_queue dst_group_queue;
};
TAILQ_HEAD(ipsec_rule_queue, ipsec_rule);
+TAILQ_HEAD(ipsec_group_queue, ipsec_rule);
struct ipsecctl {
u_int32_t rule_nr;
int opts;
struct ipsec_rule_queue rule_queue;
+ struct ipsec_group_queue group_queue;
};
int parse_rules(FILE *, struct ipsecctl *);