| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Better support of OPENPGPKEY, CAA, TLSA packets and tests
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ISO/IEC 9899:1999 §7.21.1/2 says:
Where an argument declared as size_t n specifies the length of the array
for a function, n can have the value zero on a call to that
function. Unless explicitly stated otherwise in the description of a
particular function in this subclause, pointer arguments on such a call
shall still have valid values, as described in 7.1.4.
In base64_append_width memcpy was called as memcpy(x, NULL, 0). GCC 4.9
started making use of this and assumes This worked fine under -O0, but
does something strange under -O3.
This patch fixes a bug in base64_append_width(), fixes a possible bug in
journal_file_append_entry_internal(), and makes use of the new function
to simplify the code in other places.
|
|/
|
|
|
| |
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file.
|
|
|
|
|
|
|
|
| |
libsystemd-network provides the public function
sd_dhcp_client_set_request_option() to enable the request of a given
DHCP option. However the enum defining such options is defined in the
internal header dhcp-protocol.h. Move the enum definition to the
public header sd-dhcp-client.h and properly namespace values.
|
|
|
|
|
|
| |
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.
|