summaryrefslogtreecommitdiff
path: root/src/libsystemd-dhcp/dhcp-packet.c
AgeCommit message (Collapse)Author
2014-02-28sd-network: add new libraryTom Gundersen
This is similar to sd-login, but exposes the state of networkd rather than logind. Include it in libsystemd-dhcp and rename it to libsystemd-network.
2014-02-24sd-dhcp-client: respect TP_STATUS_CSUMNOTREADYTom Gundersen
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.
2014-02-23sd-dhcp: message_init - only set secs in the clientTom Gundersen
2014-02-23sd-dhcp: don't reject packets with the 'wrong' source portTom Gundersen
The RFC does not specify that the packets from the DHCP server must come from the DHCP server port, only that that's where they should be sent. This fixes a problem when running networkd in VirtualBox. Thanks to Sébastien Luttringer for reporting the bug and very patiently testing various fixes.
2014-02-23sd-dhcp: use FIONREAD to get correct size of incoming DHCP packetTom Gundersen
This avoids the problem of broken DHCP servers sending us too big packets that don't fit in our buffer.
2014-02-23sd-dhcp: equally verify udp and raw dhcp messagesTom Gundersen
Also be more explicit about why packages are ignored.
2014-02-23sd-dhcp: be more detailed about invalid headersTom Gundersen
This may be a common problem, so let's make it simpler to debug, at least for now.
2014-02-11sd-dhcp: split out packet handling from clientTom Gundersen