When sending IP packets to userland with divert-packet rules, the
authorbluhm <bluhm@openbsd.org>
Tue, 4 Apr 2023 10:12:03 +0000 (10:12 +0000)
committerbluhm <bluhm@openbsd.org>
Tue, 4 Apr 2023 10:12:03 +0000 (10:12 +0000)
commit6a006fd4a3095d74aff2cfe0f12b4b6c6261882a
tree06e4d2fc5bfbdbc4a281442f6c4122d1c9118fd8
parent3f266bdacd577948d2ae789cfe31cc2939a83cf9
When sending IP packets to userland with divert-packet rules, the
checksum may be wrong.  Locally generated packets diverted by pf
out rules may have no checksum due to to hardware offloading.
Calculate the checksum in that case.
OK mvs@ sashan@
sys/netinet/ip_divert.c
sys/netinet6/ip6_divert.c