diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-11-10 20:05:24 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-11-10 20:05:24 +0000 |
commit | 07a6bb57bce847fbc8c588f9050591caf8ad0964 (patch) | |
tree | 73ed6ca01bf5a2af0782855c3ce4c6b29f0d559c /sys/netinet6 | |
parent | e651a54a0912d2e000bbf671fbf8319a06c84c0a (diff) |
rtable_match() takes constant destination.
For implementing MP safe route lookup, it helps to know which
function parameters are constant. Add some const declarations, so
that the compiler guarantees that sockaddr dst parameter of
rtable_match() does not change.
OK dlg@
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index c7ce800c8a6..1a022f4c2e4 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.h,v 1.109 2021/06/02 00:20:50 dlg Exp $ */ +/* $OpenBSD: in6.h,v 1.110 2023/11/10 20:05:23 bluhm Exp $ */ /* $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ */ /* @@ -446,6 +446,12 @@ satosin6(struct sockaddr *sa) return ((struct sockaddr_in6 *)(sa)); } +static inline const struct sockaddr_in6 * +satosin6_const(const struct sockaddr *sa) +{ + return ((const struct sockaddr_in6 *)(sa)); +} + static inline struct sockaddr * sin6tosa(struct sockaddr_in6 *sin6) { |