summaryrefslogtreecommitdiff
path: root/sys/netinet/raw_ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r--sys/netinet/raw_ip.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 8b874267217..bb43a7e992a 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_ip.c,v 1.126 2022/03/22 18:17:30 bluhm Exp $ */
+/* $OpenBSD: raw_ip.c,v 1.127 2022/03/23 17:22:28 bluhm Exp $ */
/* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */
/*
@@ -109,12 +109,9 @@ struct inpcbtable rawcbtable;
void
rip_init(void)
{
-
in_pcbinit(&rawcbtable, 1);
}
-struct sockaddr_in ripsrc = { sizeof(ripsrc), AF_INET };
-
struct mbuf *rip_chkhdr(struct mbuf *, struct mbuf *);
int
@@ -127,10 +124,15 @@ rip_input(struct mbuf **mp, int *offp, int proto, int af)
struct in_addr *key;
struct counters_ref ref;
uint64_t *counters;
+ struct sockaddr_in ripsrc;
KASSERT(af == AF_INET);
+ memset(&ripsrc, 0, sizeof(ripsrc));
+ ripsrc.sin_family = AF_INET;
+ ripsrc.sin_len = sizeof(ripsrc);
ripsrc.sin_addr = ip->ip_src;
+
key = &ip->ip_dst;
#if NPF > 0
if (m->m_pkthdr.pf.flags & PF_TAG_DIVERTED) {