diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-07-08 21:07:20 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-07-08 21:07:20 +0000 |
commit | d8bd1c585ae2124f99c45bc7a291df5dfed842c4 (patch) | |
tree | 9ccf94196fd30ee28874015d3c2d4371386b01d7 /sys/netinet/ip_ipsp.c | |
parent | 56e57cbf8690527f3871deeb888ee1ea07a84a29 (diff) |
The xformsw array never changes. Declare struct xformsw constant
and map data read only.
OK deraadt@ mvs@ mpi@
Diffstat (limited to 'sys/netinet/ip_ipsp.c')
-rw-r--r-- | sys/netinet/ip_ipsp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c index 5c4cf2f9efe..23ccb8829a4 100644 --- a/sys/netinet/ip_ipsp.c +++ b/sys/netinet/ip_ipsp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipsp.c,v 1.239 2021/07/08 15:13:14 bluhm Exp $ */ +/* $OpenBSD: ip_ipsp.c,v 1.240 2021/07/08 21:07:19 bluhm Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr), @@ -119,7 +119,7 @@ RBT_GENERATE(ipsec_ids_flows, ipsec_ids, id_node_id, ipsp_ids_flow_cmp); * This is the proper place to define the various encapsulation transforms. */ -struct xformsw xformsw[] = { +const struct xformsw xformsw[] = { #ifdef IPSEC { .xf_type = XF_IP4, @@ -176,7 +176,7 @@ struct xformsw xformsw[] = { #endif /* TCP_SIGNATURE */ }; -struct xformsw *xformswNXFORMSW = &xformsw[nitems(xformsw)]; +const struct xformsw *const xformswNXFORMSW = &xformsw[nitems(xformsw)]; #define TDB_HASHSIZE_INIT 32 @@ -902,7 +902,7 @@ tdb_reaper(void *xtdbp) int tdb_init(struct tdb *tdbp, u_int16_t alg, struct ipsecinit *ii) { - struct xformsw *xsp; + const struct xformsw *xsp; int err; #ifdef ENCDEBUG char buf[INET6_ADDRSTRLEN]; |