-/* $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 $ */
/*
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
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) {