Age | Commit message (Collapse) | Author |
|
If a client sends a DECLINE or a server sends a NAK, they can include
a string with a message to explain the error. Parse this and print it
at debug level.
|
|
Sort the includes accoding to the new coding style.
|
|
|
|
If we handly arbitrary data we should use "void*" pointers, not
"uint8_t*", how go intended C to be used.
|
|
Everywhere else we call the generic user data pointer just "userdata",
rather than "user_data". Let's do this here, too.
|
|
|
|
CID #1237623.
|
|
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.
|
|
|
|
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.
|
|
Otherwise we would get a nullptr dereference later on.
Found by coverity. Fixes CID #1237655.
|
|
The magic cookie is set in dhcp_message_init. Test the magic cookie
value intead of writing the last 3/4 of it directly.
Found with Coverity. Fixes: CID#1237732 CID#1237734 CID#1237735
|
|
|
|
|
|
for END
|
|
Store a pointer to the options in the DHCPMessage struct, and pass
this together with an offset around, rather than a uint8_t**.
This avoids us having to (re)compute the pointer; and changes
dhcp_option_append from adjusting both the pointer to the next
option and the remaining size of the options, to just adjusting
the current offset.
This makes the code a bit simpler to follow IMHO, but there should
be no functional change.
|
|
This test should have been updated when changing the magic cookie handling around.
Reported by Ken MacLeod.
|
|
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.
|