CVSROOT: /cvs Module name: src Changes by: d...@cvs.openbsd.org 2018/11/14 16:55:04
Modified files: sys/netinet : ip_ecn.c ip_ecn.h ip_ipip.c sys/net : if_gif.c Log message: provide ip_tos_patch() for setting ip_tos and patching the ipv4 cksum. previously the gif code would patch the tos field and not recalc the cksum, which would cause ip input code to drop the packet due to a cksum failure. the ipip code patched ip_tos and unconditionally recalculated the cksum, making it correct, but also wiping out any errors that may have been present before the recalculation. updating the cksum rather than replacing it lets cksum failures still fire. ip_tos_patch() is provided in the ecn code since it's because of ecn propagation that we need to update the tos field. internally it works like pf_patch_8 and pf_cksum_fixup, but since pf is optional it rolls its own code. procter may fix that in the future... ok claudio@