summaryrefslogtreecommitdiffstats
path: root/dhcp.h
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-11-19 14:53:56 +0000
committerRoy Marples <roy@marples.name>2008-11-19 14:53:56 +0000
commit991e95061860340023e5ed6e2f738d9ec9ae9414 (patch)
treefb5e0582d3e9a16e3a34b4406e05e2ce66a96de1 /dhcp.h
parent3faba9e651e08664d5a5719efee02e5c590618e3 (diff)
downloaddhcpcd-991e95061860340023e5ed6e2f738d9ec9ae9414.tar.xz
Adjust lengths to fit MTU.
Diffstat (limited to 'dhcp.h')
-rw-r--r--dhcp.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/dhcp.h b/dhcp.h
index 959907ab..c45fbaab 100644
--- a/dhcp.h
+++ b/dhcp.h
@@ -127,13 +127,9 @@ enum FQDN {
#define DHCP_CHADDR_LEN 16
#define SERVERNAME_LEN 64
#define BOOTFILE_LEN 128
-#define DHCP_UDP_LEN (20 + 8)
-#define DHCP_BASE_LEN (4 + 4 + 2 + 2 + 4 + 4 + 4 + 4 + 4)
-#define DHCP_RESERVE_LEN (4 + 4 + 4 + 4 + 2)
-#define DHCP_FIXED_LEN (DHCP_BASE_LEN + DHCP_CHADDR_LEN + \
- + SERVERNAME_LEN + BOOTFILE_LEN)
-#define DHCP_OPTION_LEN (MTU_MAX - DHCP_FIXED_LEN - DHCP_UDP_LEN \
- - DHCP_RESERVE_LEN)
+#define DHCP_UDP_LEN (14 + 20 + 8)
+#define DHCP_FIXED_LEN (DHCP_UDP_LEN + 226)
+#define DHCP_OPTION_LEN (MTU_MAX - DHCP_FIXED_LEN)
/* Some crappy DHCP servers require the BOOTP minimum length */
#define BOOTP_MESSAGE_LENTH_MIN 300