diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-05-25 09:55:23 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-05-25 09:55:23 +0000 |
commit | 8c02a79b2a368418130b1335a18ff37f799a6deb (patch) | |
tree | 47f201f2f3f3f339098ccce1f5eaed444fdf3e52 /sys/net | |
parent | cdc615e735f7d4f02ed5313c889b11295d1bc49a (diff) |
The arrays sadb_exts_allowed_out and sadb_exts_required_out are
constant. Put global variable declarations into header file.
OK mvs@ mpi@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/pfkeyv2.c | 7 | ||||
-rw-r--r-- | sys/net/pfkeyv2.h | 7 | ||||
-rw-r--r-- | sys/net/pfkeyv2_parsemessage.c | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c index 3a5693f630b..23f4d00a3b0 100644 --- a/sys/net/pfkeyv2.c +++ b/sys/net/pfkeyv2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2.c,v 1.211 2021/05/04 09:28:04 mvs Exp $ */ +/* $OpenBSD: pfkeyv2.c,v 1.212 2021/05/25 09:55:22 bluhm Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) 17 January 1995 @@ -122,11 +122,6 @@ static const struct sadb_alg calgs[] = { { SADB_X_CALG_LZS, 0, 0, 0} }; -extern uint64_t sadb_exts_allowed_out[SADB_MAX+1]; -extern uint64_t sadb_exts_required_out[SADB_MAX+1]; - -extern struct pool ipsec_policy_pool; - struct pool pkpcb_pool; #define PFKEY_MSG_MAXSZ 4096 const struct sockaddr pfkey_addr = { 2, PF_KEY, }; diff --git a/sys/net/pfkeyv2.h b/sys/net/pfkeyv2.h index bef399018a9..ff460c808a0 100644 --- a/sys/net/pfkeyv2.h +++ b/sys/net/pfkeyv2.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2.h,v 1.86 2020/12/14 20:20:06 tobhe Exp $ */ +/* $OpenBSD: pfkeyv2.h,v 1.87 2021/05/25 09:55:22 bluhm Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) January 1998 * @@ -436,6 +436,11 @@ void import_udpencap(struct tdb *, struct sadb_x_udpencap *); void import_tag(struct tdb *, struct sadb_x_tag *); void import_rdomain(struct tdb *, struct sadb_x_rdomain *); void import_tap(struct tdb *, struct sadb_x_tap *); + +extern const uint64_t sadb_exts_allowed_out[SADB_MAX+1]; +extern const uint64_t sadb_exts_required_out[SADB_MAX+1]; + +extern struct pool ipsec_policy_pool; #endif /* _KERNEL */ #endif /* _NET_PFKEY_V2_H_ */ diff --git a/sys/net/pfkeyv2_parsemessage.c b/sys/net/pfkeyv2_parsemessage.c index 47b6d6bd5a1..b4fd2dc8286 100644 --- a/sys/net/pfkeyv2_parsemessage.c +++ b/sys/net/pfkeyv2_parsemessage.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2_parsemessage.c,v 1.56 2021/05/06 11:29:34 mvs Exp $ */ +/* $OpenBSD: pfkeyv2_parsemessage.c,v 1.57 2021/05/25 09:55:22 bluhm Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) 17 January 1995 @@ -201,7 +201,7 @@ uint64_t sadb_exts_required_in[SADB_MAX+1] = BITMAP_X_POLICY, }; -uint64_t sadb_exts_allowed_out[SADB_MAX+1] = +const uint64_t sadb_exts_allowed_out[SADB_MAX+1] = { /* RESERVED */ ~0, @@ -237,7 +237,7 @@ uint64_t sadb_exts_allowed_out[SADB_MAX+1] = BITMAP_X_SRC_FLOW | BITMAP_X_DST_FLOW | BITMAP_X_SRC_MASK | BITMAP_X_DST_MASK | BITMAP_X_FLOW_TYPE | BITMAP_X_POLICY, }; -uint64_t sadb_exts_required_out[SADB_MAX+1] = +const uint64_t sadb_exts_required_out[SADB_MAX+1] = { /* RESERVED */ 0, |