chiark / gitweb /
sd-dhcp-client: move magic cookie into DHCPMessage struct
authorTom Gundersen <teg@jklm.no>
Sun, 6 Apr 2014 12:05:32 +0000 (14:05 +0200)
committerTom Gundersen <teg@jklm.no>
Sun, 6 Apr 2014 17:36:05 +0000 (19:36 +0200)
commit3b7ca119fdc501e21f017695dc9b6f82fdbd1d93
treeefefc912fa1925f1197dd0e5b56a14ad2282de38
parent19aa72f74e41045510b4af3f1415b419d42ff20b
sd-dhcp-client: move magic cookie into DHCPMessage struct

Also move the checking of it to the main message handler, rather than the
options parser.

Fix a bug, so we now drop the packet if any of the magic bytes don't match.
Before we used to only drop the packet if they were all wrong.
src/libsystemd-network/dhcp-option.c
src/libsystemd-network/dhcp-packet.c
src/libsystemd-network/dhcp-protocol.h
src/libsystemd-network/sd-dhcp-client.c