summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/test-dhcp-client.c
AgeCommit message (Collapse)Author
2014-06-17sd-dhcp: checksum - make endianess-neutralTom Gundersen
For efficiency, we group bytes together before adding them up. This is guaranteed to always work (regardless of the byte order) as long as the i-th byte in each group lign up with the i-th byte in each other group. On big-endian machines this broke when handling the trailing few bytes which did not make up a full group of 4 bytes. This patch fixes the problem by explicitly creating a 4 byte zero-padded group out of the trailing bytes. Reported and tested by Thomas Ritter <th.ritter@gmx.at>.
2014-05-06dhcp-network: don't pass ifindex to bind_udp_socketTom Gundersen
UDP sockets can anyway not be bound to specific netdev's. The packages would have to be filtered when received instead.
2014-04-27libnetworkd: add link local testsUmut Tezduyar Lindskog
- Also only allow positive ifindex on both dhcp and ipv4ll [tomegun: the kernel always sets a positive ifindex, but some APIs accept ifindex=0 with various meanings, so we should protect against accidentally passing ifindex=0 along.]
2014-04-12test-dhcp-client: unref lease objects to make valgrind happyZbigniew Jędrzejewski-Szmek
Also unref client objects in test code, and initalize logging, to DEBUG by default.
2014-04-11sd-dhcp-client: Add reference counting for DHCPPatrik Flykt
The DHCP library user can decide to free the DHCP client any time the callback is called. After the callback has been called, other computations may still be needed - the best example being a full restart of the DHCP procedure in case of lease expiry. Fix this by introducing proper reference counting. Properly handle a returned NULL from the notify and stop functions if the DHCP client was freed.
2014-04-10sd-dhcp-client: test - fix for jenkinsTom Gundersen
This test should have been updated when changing the magic cookie handling around. Reported by Ken MacLeod.
2014-04-07test-dhcp-client: style fixesZbigniew Jędrzejewski-Szmek
2014-04-06sd-dhcp-client: improve BPFTom Gundersen
Try a bit harder to make the kernel drop packets not for us. This should reduce the number of wakeups from n^2 to n in the number of dhcp clients, which admittedly only makes a differenc in very extreme cases.
2014-03-24sd-event: rework API to support CLOCK_REALTIME_ALARM and ↵Lennart Poettering
CLOCK_BOOTTIME_ALARM, too
2014-03-22sd-dhcp-client: test - don't close socket twiceTom Gundersen
One end of the socketpair is closed by the library, so only close our end. Also switch to the safe_close() so we get notified about problems with closing.
2014-03-20libsystemd-dhcp: Update client test case for client id and end optionPatrik Flykt
Check that the client identifier is formatted as suggested in the RFC and that the messages sent ends with an end option.
2014-03-19libsystemd-network: Add hangcheck timer for DHCP client testPatrik Flykt
2014-03-19libsystemd-network: Export checksum function to test casePatrik Flykt
Remove identical checksum function implementation from the test case code.
2014-03-12test-dhcp-client: remove pointless initializer, wrongly committed earlierKay Sievers
2014-03-11build-sys: add libsystemd-label to network/dhcp usersKay Sievers
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.