Mercurial > hg > dhcpcd
changeset 5028:c06163d3bc14 draft
DHCP: Support jumbo frames
Also important as we now need to store the frame header in the
initial buffer.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Wed, 05 Feb 2020 14:05:51 +0000 |
| parents | cdf241b94d99 |
| children | f979cefdddcf |
| files | src/dhcp.c src/if.h src/privsep-bpf.c |
| diffstat | 3 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dhcp.c Wed Feb 05 13:29:45 2020 +0000 +++ b/src/dhcp.c Wed Feb 05 14:05:51 2020 +0000 @@ -3507,7 +3507,7 @@ dhcp_readbpf(void *arg) { struct interface *ifp = arg; - uint8_t buf[MTU_MAX]; + uint8_t buf[FRAMELEN_MAX]; ssize_t bytes; struct dhcp_state *state = D_STATE(ifp); ssize_t fl = (ssize_t)bpf_frame_header_len(ifp);
--- a/src/if.h Wed Feb 05 13:29:45 2020 +0000 +++ b/src/if.h Wed Feb 05 14:05:51 2020 +0000 @@ -90,6 +90,10 @@ # define ARPHRD_INFINIBAND 32 #endif +/* Maximum frame length. + * Support jumbo frames and some extra. */ +#define FRAMELEN_MAX 10240 + /* Work out if we have a private address or not * 10/8 * 172.16/12
