summaryrefslogtreecommitdiff
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
parent199d2eb4f1d1f0d1c8ea83e29f2700e38e694096 (diff)
The global zero addresses must not change, mark them constant.
OK tb@ visa@
-rw-r--r--sys/netinet/in.h4
-rw-r--r--sys/netinet/in_pcb.c8
-rw-r--r--sys/netinet6/in6.h4
-rw-r--r--sys/netinet6/in6_pcb.c4
4 files changed, 10 insertions, 10 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;
diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h
index 337f48738cf..8381ba54f59 100644
--- a/sys/netinet6/in6.h
+++ b/sys/netinet6/in6.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.h,v 1.101 2018/02/10 05:52:08 florian Exp $ */
+/* $OpenBSD: in6.h,v 1.102 2018/06/07 08:46:24 bluhm Exp $ */
/* $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ */
/*
@@ -405,7 +405,7 @@ typedef __socklen_t socklen_t; /* length type for network syscalls */
#ifdef _KERNEL
extern const u_char inet6ctlerrmap[];
-extern struct in6_addr zeroin6_addr;
+extern const struct in6_addr zeroin6_addr;
struct mbuf;
struct ifnet;
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
index 172af315416..523237f624e 100644
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_pcb.c,v 1.102 2018/06/03 21:32:32 bluhm Exp $ */
+/* $OpenBSD: in6_pcb.c,v 1.103 2018/06/07 08:46:24 bluhm Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -132,7 +132,7 @@
* Globals
*/
-struct in6_addr zeroin6_addr;
+const struct in6_addr zeroin6_addr;
/*
* Keep separate inet6ctlerrmap, because I may remap some of these.