Index: sys/netinet/ip_input.c =================================================================== RCS file: /mount/openbsd/cvs/src/sys/netinet/ip_input.c,v diff -u -p -u -p -r1.401 ip_input.c --- sys/netinet/ip_input.c 6 Aug 2024 16:56:09 -0000 1.401 +++ sys/netinet/ip_input.c 21 Nov 2024 11:07:43 -0000 @@ -146,7 +146,7 @@ static struct mbuf_queue ipsendraw_mq; extern struct niqueue arpinq; -int ip_ours(struct mbuf **, int *, int, int); +int ip_ours_enqueue(struct mbuf **mp, int *offp, int nxt); int ip_dooptions(struct mbuf *, struct ifnet *, int); int in_ouraddr(struct mbuf *, struct ifnet *, struct route *, int); @@ -259,6 +259,12 @@ ip_ours(struct mbuf **mp, int *offp, int if (nxt == IPPROTO_DONE) return IPPROTO_DONE; + return ip_ours_enqueue(mp, offp, nxt); +} + +int +ip_ours_enqueue(struct mbuf **mp, int *offp, int nxt) +{ /* save values for later, use after dequeue */ if (*offp != sizeof(struct ip)) { struct m_tag *mtag; @@ -766,11 +772,11 @@ ip_deliver(struct mbuf **mp, int *offp, switch (af) { case AF_INET: counters_dec(ipcounters, ips_delivered); - break; + return ip_ours_enqueue(mp, offp, nxt); #ifdef INET6 case AF_INET6: counters_dec(ip6counters, ip6s_delivered); - break; + return ip6_ours_enqueue(mp, offp, nxt); #endif } break; Index: sys/netinet/ip_var.h =================================================================== RCS file: /mount/openbsd/cvs/src/sys/netinet/ip_var.h,v diff -u -p -u -p -r1.120 ip_var.h --- sys/netinet/ip_var.h 12 Jul 2024 19:50:35 -0000 1.120 +++ sys/netinet/ip_var.h 21 Nov 2024 11:07:43 -0000 @@ -264,6 +264,7 @@ void ip_savecontrol(struct inpcb *, str struct mbuf *); int ip_input_if(struct mbuf **, int *, int, int, struct ifnet *); int ip_deliver(struct mbuf **, int *, int, int, int); +int ip_ours(struct mbuf **, int *, int, int); void ip_forward(struct mbuf *, struct ifnet *, struct route *, int); int rip_ctloutput(int, struct socket *, int, int, struct mbuf *); void rip_init(void); Index: sys/netinet6/ip6_input.c =================================================================== RCS file: /mount/openbsd/cvs/src/sys/netinet6/ip6_input.c,v diff -u -p -u -p -r1.266 ip6_input.c --- sys/netinet6/ip6_input.c 19 Jul 2024 16:58:32 -0000 1.266 +++ sys/netinet6/ip6_input.c 21 Nov 2024 11:07:43 -0000 @@ -189,6 +189,12 @@ ip6_ours(struct mbuf **mp, int *offp, in if (nxt == IPPROTO_DONE) return IPPROTO_DONE; + return ip6_ours_enqueue(mp, offp, nxt); +} + +int +ip6_ours_enqueue(struct mbuf **mp, int *offp, int nxt) +{ /* save values for later, use after dequeue */ if (*offp != sizeof(struct ip6_hdr)) { struct m_tag *mtag; Index: sys/netinet6/ip6_var.h =================================================================== RCS file: /mount/openbsd/cvs/src/sys/netinet6/ip6_var.h,v diff -u -p -u -p -r1.120 ip6_var.h --- sys/netinet6/ip6_var.h 12 Jul 2024 19:50:35 -0000 1.120 +++ sys/netinet6/ip6_var.h 21 Nov 2024 11:07:43 -0000 @@ -311,6 +311,8 @@ int icmp6_ctloutput(int, struct socket * void ip6_init(void); void ip6intr(void); int ip6_input_if(struct mbuf **, int *, int, int, struct ifnet *); +int ip6_ours(struct mbuf **, int *, int, int, int); +int ip6_ours_enqueue(struct mbuf **, int *, int); void ip6_freepcbopts(struct ip6_pktopts *); void ip6_freemoptions(struct ip6_moptions *); int ip6_unknown_opt(struct mbuf **, u_int8_t *, int);