MTU_MIN, MTU_MAX #344
Replies: 3 comments 1 reply
-
https://datatracker.ietf.org/doc/html/rfc2131#section-2
https://datatracker.ietf.org/doc/html/rfc1542#section-2.1
From my testing over the years, the BOOTP message size of 300 octets is a real thing. Some servers reject a BOOTP message that's smaller. However, testing shows my assumption is not correct. 576 - (IP + UDP header size of 28) == bootp message size with vendor length of 312. |
Beta Was this translation helpful? Give feedback.
-
We'll fix this in #345 |
Beta Was this translation helpful? Give feedback.
-
@jvfranklin I can't seem to tag you in that issue. Anyway, could you review the PR please and make sure it fixes things for you? |
Beta Was this translation helpful? Give feedback.
-
In src/dhcp.c make_message(), there's this code enforcing a minimum MTU:
else if (mtu < MTU_MIN) {
if (if_setmtu(ifp, MTU_MIN) == -1)
MTU_MIN is defined in src/dhcp-common.h:
#define IP_UDP_SIZE 28
#define MTU_MAX 1500 - IP_UDP_SIZE
#define MTU_MIN 576 + IP_UDP_SIZE
I work on an embedded Linux system that allows a minimum MTU on the link of 576. It appears from my initial testing that dhcpcd is able to send and receive DHCP messages without any issue if I change MTU_MIN=576. Our previous DHCP client was also able to handle this, as well. I don't see any fragmentation in the packet captures. The ethernet frames are less than 400 bytes, at least for my environment.
Is there a history on this code that requires MTU_MIN to be 604?
Also wondering about the MTU_MAX, though I haven't explored its effect in our product yet.
Beta Was this translation helpful? Give feedback.
All reactions