summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/test-dhcp-client.c
Commit message (Collapse)AuthorAge
* libsystemd-network: use CLOCK_BOOTTIME instead of CLOCK_MONOTONIC where possibleTom Gundersen2014-07-24
| | | | | | | The timeouts in the networking library (DHCP lease timeouts and similar) should not be affected by suspend. In the cases where CLOCK_BOOTTIME is not implemented, it is still safe to fallback to CLOCK_MONOTONIC, as the consumers of the library (i.e., networkd) _should_ renew the leases when coming out of suspend.
* dhcp-network: add check for DHCP.chaddrMichal Sekletar2014-07-07
| | | | | | Check that received DHCP packets actually include our MAC address in chaddr field. BPF interpreter has 32 bit wide registers but MAC address is 48 bits long so we have to do check in two steps.
* sd-dhcp: checksum - make endianess-neutralTom Gundersen2014-06-17
| | | | | | | | | | | | | | 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>.
* dhcp-network: don't pass ifindex to bind_udp_socketTom Gundersen2014-05-06
| | | | | UDP sockets can anyway not be bound to specific netdev's. The packages would have to be filtered when received instead.
* libnetworkd: add link local testsUmut Tezduyar Lindskog2014-04-27
| | | | | | | | - 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.]
* test-dhcp-client: unref lease objects to make valgrind happyZbigniew Jędrzejewski-Szmek2014-04-12
| | | | | Also unref client objects in test code, and initalize logging, to DEBUG by default.
* sd-dhcp-client: Add reference counting for DHCPPatrik Flykt2014-04-11
| | | | | | | | | | | 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.
* sd-dhcp-client: test - fix for jenkinsTom Gundersen2014-04-10
| | | | | | This test should have been updated when changing the magic cookie handling around. Reported by Ken MacLeod.
* test-dhcp-client: style fixesZbigniew Jędrzejewski-Szmek2014-04-07
|
* sd-dhcp-client: improve BPFTom Gundersen2014-04-06
| | | | | | 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.
* sd-event: rework API to support CLOCK_REALTIME_ALARM and ↵Lennart Poettering2014-03-24
| | | | CLOCK_BOOTTIME_ALARM, too
* sd-dhcp-client: test - don't close socket twiceTom Gundersen2014-03-22
| | | | | 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.
* libsystemd-dhcp: Update client test case for client id and end optionPatrik Flykt2014-03-20
| | | | | Check that the client identifier is formatted as suggested in the RFC and that the messages sent ends with an end option.
* libsystemd-network: Add hangcheck timer for DHCP client testPatrik Flykt2014-03-19
|
* libsystemd-network: Export checksum function to test casePatrik Flykt2014-03-19
| | | | | Remove identical checksum function implementation from the test case code.
* test-dhcp-client: remove pointless initializer, wrongly committed earlierKay Sievers2014-03-12
|
* build-sys: add libsystemd-label to network/dhcp usersKay Sievers2014-03-11
|
* sd-network: add new libraryTom Gundersen2014-02-28
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.