chiark / gitweb /
sd-dhcp-client: respect TP_STATUS_CSUMNOTREADY
authorTom Gundersen <teg@jklm.no>
Mon, 24 Feb 2014 00:09:21 +0000 (01:09 +0100)
committerTom Gundersen <teg@jklm.no>
Mon, 24 Feb 2014 02:28:19 +0000 (03:28 +0100)
commit55dab2ed837c17236b7df12decaffbc4388d1dff
tree44b39f61128131327baf3311277d4694311b7446
parent872c2ab3e2887c1c2b6c9815a201683e246e56fc
sd-dhcp-client: respect TP_STATUS_CSUMNOTREADY

If an UDP packet has not passed through a hardware device, its checksum may not
have been computed. This is exposed through the TP_STATUS_CSUMNOTREADY sockopt.

When using raw sockets, skip checksum validation when TP_STATUS_CSUMNOTREADY
is set.

This is necessary for dhcp to work directly over a veth tunnel, e.g. as done
in systemd-nspawn.
src/libsystemd-dhcp/dhcp-internal.h
src/libsystemd-dhcp/dhcp-network.c
src/libsystemd-dhcp/dhcp-packet.c
src/libsystemd-dhcp/sd-dhcp-client.c