CVSROOT:        /cvs
Module name:    src
Changes by:     bl...@cvs.openbsd.org   2025/02/07 16:08:48

Modified files:
        usr.sbin/dhcrelay: bpf.c dhcpd.h packet.c 
        usr.sbin/dhcrelay6: bpf.c dhcpd.h packet.c 

Log message:
Respect checksum offloading in dhcrelay(8) and dhcrelay6(8).

When sending IP packets over virtual machines on the same host,
vio(4) can offload the checksum and never calculate it.  As neither
sender nor host calculate checksum, it is always wrong, and the
receiver has to check a flag.  A similar fix has been commited to
dhcpleased(8) and dhcpd(8).
RFC 1071 recommends to verify the checksum by calculating it over
the packet including the checksum and compare to 0.  That is also
what our kernel does.  Convert the logic to that algorithm.

tested and OK jan@

Reply via email to