address family passed down with pr_input to check that the correct
one is used.
OK florian@
-/* $OpenBSD: raw_ip.c,v 1.98 2017/04/14 20:46:31 bluhm Exp $ */
+/* $OpenBSD: raw_ip.c,v 1.99 2017/04/17 21:10:03 bluhm Exp $ */
/* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */
/*
struct counters_ref ref;
uint64_t *counters;
+ KASSERT(af == AF_INET);
+
ripsrc.sin_addr = ip->ip_src;
TAILQ_FOREACH(inp, &rawcbtable.inpt_queue, inp_queue) {
if (inp->inp_socket->so_state & SS_CANTRCVMORE)
-/* $OpenBSD: raw_ip6.c,v 1.109 2017/04/14 20:46:31 bluhm Exp $ */
+/* $OpenBSD: raw_ip6.c,v 1.110 2017/04/17 21:10:03 bluhm Exp $ */
/* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */
/*
struct sockaddr_in6 rip6src;
struct mbuf *opts = NULL;
+ KASSERT(af == AF_INET6);
+
rip6stat_inc(rip6s_ipackets);
/* Be proactive about malicious use of IPv4 mapped address */