summaryrefslogtreecommitdiff
path: root/sys/netinet6/in6_pcb.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2023-12-03 20:24:18 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2023-12-03 20:24:18 +0000
commit0de8fe1768c4f3213e45897dea6282984113ece3 (patch)
tree53ee726ea00156e5c9e5033d9693812b0ee692ab /sys/netinet6/in6_pcb.c
parentb14ffc0bbc57b05fe6d917206c4ce3b153ae785d (diff)
Use INP_IPV6 flag instead of sotopf().
During initialization in_pcballoc() sets INP_IPV6 once to avoid reaching through inp_socket->so_proto->pr_domain->dom_family. Use this flag consistently. OK sashan@ mvs@
Diffstat (limited to 'sys/netinet6/in6_pcb.c')
-rw-r--r--sys/netinet6/in6_pcb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
index 83b6caa08b6..4ced92a948f 100644
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_pcb.c,v 1.128 2023/12/01 15:30:47 bluhm Exp $ */
+/* $OpenBSD: in6_pcb.c,v 1.129 2023/12/03 20:24:17 bluhm Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -252,7 +252,7 @@ in6_pcbconnect(struct inpcb *inp, struct mbuf *nam)
int error;
struct sockaddr_in6 tmp;
- KASSERT(inp->inp_flags & INP_IPV6);
+ KASSERT(ISSET(inp->inp_flags, INP_IPV6));
if ((error = in6_nam2sin6(nam, &sin6)))
return (error);
@@ -461,7 +461,7 @@ in6_pcbnotify(struct inpcbtable *table, struct sockaddr_in6 *dst,
rw_enter_write(&table->inpt_notify);
mtx_enter(&table->inpt_mtx);
TAILQ_FOREACH(inp, &table->inpt_queue, inp_queue) {
- if ((inp->inp_flags & INP_IPV6) == 0)
+ if (!ISSET(inp->inp_flags, INP_IPV6))
continue;
/*