OpenBSD/src nVoRp0Nsys/net if_gif.c, sys/netinet ip_ecn.c ip_ipip.c

   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@
VersionDeltaFile
1.9+22-1sys/netinet/ip_ecn.c
1.89+4-6sys/netinet/ip_ipip.c
1.124+3-2sys/net/if_gif.c
1.7+2-1sys/netinet/ip_ecn.h
+31-104 files

UnifiedSplitRaw