Hooks
-----
-Not all the hooks in hook.d are installed by default.
-By default we install 01-test.sh, 10-resolv.conf.sh and 15-hostname.sh.
+Not all the hooks in dhcpcd-hooks are installed by default.
+By default we install 01-test, 05-mtu, 10-resolv.conf and 15-hostname.
To add more simply add them in the HOOKSCRIPTS variable.
-make HOOKSCRIPTS=50-ntp.sh install
+make HOOKSCRIPTS=50-ntp install
Compatibility
-------------
If you require compatibility with dhcpcd-3 and older style variables,
-you can install 50-dhcpcd-compat.sh into the directory $LIBEXECDIR/dhcpcd.hook.d
+you can install 50-dhcpcd-compat into the directory $LIBEXECDIR/dhcpcd-hooks
We don't install this by default.
You should also add -DCMDLINE_COMPAT to your CFLAGS if you need to be fully
commandline compatible with prior versions.
DHCP_DNSSERVER = 6,
DHCP_HOSTNAME = 12,
DHCP_DNSDOMAIN = 15,
+ DHCP_MTU = 26,
DHCP_BROADCAST = 28,
DHCP_STATICROUTE = 33,
DHCP_NISDOMAIN = 40,
--- /dev/null
+# Configure the MTU for the interface
+
+if [ -n "${new_interface_mtu}" ]; then
+ ifconfig "${interface}" mtu "${new_interface_mtu}"
+fi
LIBEXECDIR= ${PREFIX}/libexec
HOOKDIR= ${LIBEXECDIR}/dhcpcd-hooks
-SYSTEMSCRIPTS= 01-test 10-resolv.conf 15-hostname
+SYSTEMSCRIPTS= 01-test 05-mtu 10-resolv.conf 15-hostname
FILES= ${SYSTEMSCRIPTS} ${HOOKSCRIPTS}
FILESDIR= ${HOOKDIR}
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd Jun 11, 2008
+.Dd Jun 13, 2008
.Dt DHCPCD 8 SMM
.Sh NAME
.Nm dhcpcd
Matches full name, or prefixed with 2 numbers optionally ending with
.Pa .sh .
.Pp
-So to stop dhcpcd from touching your DNS settings you would do:-
-.D1 dhcpcd -C resolv.conf
+So to stop dhcpcd from touching your DNS or MTU settings you would do:-
+.D1 dhcpcd -C resolv.conf -C mtu eth0
.It Fl L , -noipv4ll
Don't use IPv4LL at all.
.It Fl O , -nooption Ar option
#ifdef CMDLINE_COMPAT
case 'H': /* FALLTHROUGH */
case 'M':
+ del_reqmask(options->reqmask, DHCP_MTU);
break;
case 'N':
del_reqmask(options->reqmask, DHCP_NTPSERVER);
# Most distros have ntp support.
option ntp_servers
+
+# We should behave nicely on networks and respect their MTU
+option interface_mtu