Skip to content

MTU_MIN, MTU_MAX #345

@rsmarples

Description

@rsmarples

Discussed in #344

Originally posted by jvfranklin July 27, 2024
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions