Fix route leak in ip input.
authorbluhm <bluhm@openbsd.org>
Wed, 8 May 2024 13:01:30 +0000 (13:01 +0000)
committerbluhm <bluhm@openbsd.org>
Wed, 8 May 2024 13:01:30 +0000 (13:01 +0000)
commit652f3531c50b1870271ce5e3d3613f6597e0e5ca
tree163df123b33cc176c20eca1d1dbbebee8ce5ca56
parent2f9dee1d4de5aed234853a17b3e715b24e4027bd
Fix route leak in ip input.

In previous commit when refactoring the route cache, a rtfree() has
been forgotten.  For each forwarded packet the reference counter
of the route entry was increased.  This eventually leads to an
integer overflow and triggers kassert.

reported by and OK jan@
sys/netinet/ip_input.c
sys/netinet6/ip6_input.c