summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2018-06-07 08:46:25 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2018-06-07 08:46:25 +0000
commita7c5bcbdd9a68092d875d5494df48a5398d735be (patch)
tree304e2b8789a9d3c7891e7d05cb4a362eaa63c723 /sys/netinet
parent199d2eb4f1d1f0d1c8ea83e29f2700e38e694096 (diff)
The global zero addresses must not change, mark them constant.
OK tb@ visa@
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in.h4
-rw-r--r--sys/netinet/in_pcb.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index 588c724e771..c864c56d09c 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in.h,v 1.129 2018/03/02 15:52:11 claudio Exp $ */
+/* $OpenBSD: in.h,v 1.130 2018/06/07 08:46:24 bluhm Exp $ */
/* $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ */
/*
@@ -795,7 +795,7 @@ __END_DECLS
#ifdef _KERNEL
extern const int inetctlerrmap[];
-extern struct in_addr zeroin_addr;
+extern const struct in_addr zeroin_addr;
struct mbuf;
struct sockaddr;
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 184ebca11e5..4c4ca0c8b10 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_pcb.c,v 1.234 2018/06/06 06:55:22 mpi Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.235 2018/06/07 08:46:24 bluhm Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
@@ -104,7 +104,7 @@
#include <netinet/ip_esp.h>
#endif /* IPSEC */
-struct in_addr zeroin_addr;
+const struct in_addr zeroin_addr;
union {
struct in_addr za_in;
@@ -1146,7 +1146,7 @@ in_pcblookup_listen(struct inpcbtable *table, struct in_addr laddr,
u_int lport_arg, struct mbuf *m, u_int rtable)
{
struct inpcbhead *head;
- struct in_addr *key1, *key2;
+ const struct in_addr *key1, *key2;
struct inpcb *inp;
u_int16_t lport = lport_arg;
u_int rdomain;
@@ -1227,7 +1227,7 @@ in6_pcblookup_listen(struct inpcbtable *table, struct in6_addr *laddr,
u_int lport_arg, struct mbuf *m, u_int rtable)
{
struct inpcbhead *head;
- struct in6_addr *key1, *key2;
+ const struct in6_addr *key1, *key2;
struct inpcb *inp;
u_int16_t lport = lport_arg;
u_int rdomain;