diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-05-23 15:56:01 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-05-26 15:34:41 +0200 |
commit | 004845d18ed31fe5ffc153699f63e58dc8b24171 (patch) | |
tree | 71d747cd4ba0b3b923819c9358ef0ea67e49b69b /src/libsystemd-network/dhcp-internal.h | |
parent | e81f2539673b536c1b20fe2fd0650079d71125a2 (diff) |
sd-network: unify packet processing logic a bit
Let's always check for errno being EAGAIN/EINTR the same way, and always log if
we receive weirdly short packets.
Diffstat (limited to 'src/libsystemd-network/dhcp-internal.h')
-rw-r--r-- | src/libsystemd-network/dhcp-internal.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd-network/dhcp-internal.h b/src/libsystemd-network/dhcp-internal.h index 4662b0d847..99f690897d 100644 --- a/src/libsystemd-network/dhcp-internal.h +++ b/src/libsystemd-network/dhcp-internal.h @@ -65,4 +65,5 @@ int dhcp_packet_verify_headers(DHCPPacket *packet, size_t len, bool checksum); #define DHCP_CLIENT_DONT_DESTROY(client) \ _cleanup_(sd_dhcp_client_unrefp) _unused_ sd_dhcp_client *_dont_destroy_##client = sd_dhcp_client_ref(client) -#define log_dhcp_client(client, fmt, ...) log_internal(LOG_DEBUG, 0, __FILE__, __LINE__, __func__, "DHCP CLIENT (0x%x): " fmt, client->xid, ##__VA_ARGS__) +#define log_dhcp_client_errno(client, error, fmt, ...) log_internal(LOG_DEBUG, error, __FILE__, __LINE__, __func__, "DHCP CLIENT (0x%x): " fmt, client->xid, ##__VA_ARGS__) +#define log_dhcp_client(client, fmt, ...) log_dhcp_client_errno(client, 0, fmt, ##__VA_ARGS__) |