Reduce code duplication in ip6 divert.
authorbluhm <bluhm@openbsd.org>
Mon, 1 Jan 2024 18:52:09 +0000 (18:52 +0000)
committerbluhm <bluhm@openbsd.org>
Mon, 1 Jan 2024 18:52:09 +0000 (18:52 +0000)
commit61540639339d517fb8508d938dc5c45ead13ba4e
treec7bdcd1bc56548dd2cf0d634f384262a4fa83305
parentb5b8bc53ca00dc14cccb11ede4abd86818e9a05b
Reduce code duplication in ip6 divert.

Protocols like UDP or TCP keep only functions in netinet6 that are
essentially different.  Remove divert6_detach(), divert6_lock(),
divert6_unlock(), divert6_bind(), and divert6_shutdown().  Replace
them with identical IPv4 functions.  INP_HDRINCL is an IPv4 only
option, remove it from divert6_attach().

OK mvs@ sashan@ kn@
sys/netinet6/ip6_divert.c
sys/netinet6/ip6_divert.h