summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-dhcp-server.c
AgeCommit message (Collapse)Author
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2015-02-12Revert "tree-wide: Always use recvmsg with MSG_CMSG_CLOEXEC"Lennart Poettering
This reverts commit d6d810fbf8071f8510450dbacd1d083f37603656. It's apparently not OK to pass MSG_CMSG_CLOEXEC to recvmsg() of raw sockets.
2015-02-10tree-wide: Always use recvmsg with MSG_CMSG_CLOEXECCristian RodrĂ­guez
2015-02-09treewide: correct typos and use consistent "MAC" spellingTorstein Husebø
2014-10-11sd-dhcp-client: support non-Ethernet hardware addressesDan Williams
Like Infiniband. See RFC 4390 section 2.1 for details on DHCP and Infiniband; chaddr is zeroed, hlen is set to 0, and htype is set to ARPHRD_INFINIBAND because IB hardware addresses are 20 bytes in length.
2014-09-15hashmap: introduce hash_ops to make struct Hashmap smallerMichal Schmidt
It is redundant to store 'hash' and 'compare' function pointers in struct Hashmap separately. The functions always comprise a pair. Store a single pointer to struct hash_ops instead. systemd keeps hundreds of hashmaps, so this saves a little bit of memory.
2014-08-14sd-dhcp-server: linebreaksTom Gundersen
Don't overflow unnecessarily.
2014-08-04sd-dhcp-server: always send out ROUTER and SUBNET_MASKTom Gundersen
For now we simply take these values from the server's address.
2014-08-03sd-dhcp-server: avoid returning garbage valueThomas Hindoe Paaboel Andersen
Force renewing with a pool size of 0 would return the uninitialized r.
2014-08-03sd-dhcp-server: check if r < 0Thomas Hindoe Paaboel Andersen
2014-07-28sd-dhcp-server: add forcerenew supportTom Gundersen
2014-07-24libsystemd-network: use CLOCK_BOOTTIME instead of CLOCK_MONOTONIC where possibleTom Gundersen
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.
2014-07-14sd-dhcp-server: make gcc happyTom Gundersen
It complains about optoffset possibly being uninitialized. It is wrong, but let's just initialize it.
2014-06-29networkd/sd-dhcp-server: only start dhcp server when necessaryTom Gundersen
2014-06-21sd-dhcp-server: change default lease time form 1m to 1hTom Gundersen
The short lease was useful for testing, but in real-world usage it is pointless to keep leases this short. That said, the cost of lease renewal is really low, so we keep the lease still relatively short at one hour to not get into hard-to-hit problems with lease exhaustion etc.
2014-06-21sd-dhcp-server: fix broadcast of DHCP packetsTom Gundersen
The destination IP address should be INADDR_BROADCAST, but was accidentally left as INADDR_ANY.
2014-06-20sd-dhcp-server: remove unused cleanup functionThomas Hindoe Paaboel Andersen
Removes _cleanup_dhcp_lease_free_. While the automatic cleanup functions are great to have this one is never used and causes a warning in clang.
2014-06-19dhcp-server: simplify dhcp server unref callLennart Poettering
No need to use HASHMAP_ITERATE when we destruct all entries anyway.
2014-06-18sd-dhcp-server: fix a leakThomas Hindoe Paaboel Andersen
We must use free instead of dhcp_lease_free here to avoid freeing client_id.data.
2014-06-13sd-dhcp-server: add RELEASE supportTom Gundersen
2014-06-13sd-dhcp-server: add dummy DECLINE supportTom Gundersen
2014-06-13sd-dhcp-server: track bound leasesTom Gundersen
Make sure we don't hand out the same IP twice. We still don't handle lease expiry.
2014-06-13sd-dhcp-server: add support for clients requesting lease lifetimeTom Gundersen
2014-06-13sd-dhcp-server: add basic NAK supportTom Gundersen
2014-06-13sd-dhcp-server: add basic REQUEST/ACK supportTom Gundersen
2014-06-13sd-dhcp-server: add basic DISCOVER/OFFER supportTom Gundersen
2014-06-13sd-dhcp-server: add support for sending messagesTom Gundersen
2014-06-13sd-dhcp-server: add support for setting the server addressTom Gundersen
2014-06-13sd-dhcp-server: bind to raw socket for sendingTom Gundersen
We would like to use the UDP socket, but we cannot as we need to specify the MAC address manually.
2014-06-13sd-dhcp-server: add basic message parsingTom Gundersen
Parse the maximum message size the client can accept and the client id, falling back to sane defaults if they are not set.
2014-06-13sd-dhcp-server: add basic message handling and verificationTom Gundersen
2014-06-13sd-dhcp-server: bind to a given interfaceTom Gundersen
We will (at least at first), restrict our focus to running the server on at most one interface.
2014-06-13sd-dhcp-server: add basic functionality for starting/stopping serverTom Gundersen
Bind to UDP socket and listen for messages, discarding anything we receive.
2014-06-13sd-dhcp-server: add basic functionality for creating/destroying server instanceTom Gundersen