diff options
author | Tom Gundersen <teg@jklm.no> | 2014-08-01 16:10:13 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-08-01 16:34:50 +0200 |
commit | 324f818781a250b60f2fcfa74ff1c9101d2d1315 (patch) | |
tree | fc3679fe7753eb884d3f75153138e44b0d3f736b /src/libsystemd-network/dhcp-protocol.h | |
parent | c18126e8da7290725af9e3a86e25b2aefbc1ecae (diff) |
sd-dhcp-client: allow the max dhcp message size to be set to the MTU of the link
Diffstat (limited to 'src/libsystemd-network/dhcp-protocol.h')
-rw-r--r-- | src/libsystemd-network/dhcp-protocol.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd-network/dhcp-protocol.h b/src/libsystemd-network/dhcp-protocol.h index f5119a7a58..abca9422c5 100644 --- a/src/libsystemd-network/dhcp-protocol.h +++ b/src/libsystemd-network/dhcp-protocol.h @@ -60,7 +60,8 @@ typedef struct DHCPPacket DHCPPacket; #define DHCP_IP_SIZE (int32_t)(sizeof(struct iphdr)) #define DHCP_IP_UDP_SIZE (int32_t)(sizeof(struct udphdr) + DHCP_IP_SIZE) #define DHCP_MESSAGE_SIZE (int32_t)(sizeof(DHCPMessage)) -#define DHCP_MIN_OPTIONS_SIZE 308 /* spec says 312, but that includes the magic cookie */ +#define DHCP_DEFAULT_MIN_SIZE 576 /* the minimum internet hosts must be able to receive */ +#define DHCP_MIN_OPTIONS_SIZE DHCP_DEFAULT_MIN_SIZE - DHCP_IP_UDP_SIZE - DHCP_MESSAGE_SIZE #define DHCP_MAGIC_COOKIE (uint32_t)(0x63825363) enum { |