public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: "Peter Müller" <peter.mueller@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH 2/3] dhcpcd: Remove old MTU setting script
Date: Tue, 22 Feb 2022 19:16:51 +0000	[thread overview]
Message-ID: <a421ddd0-48f3-87ab-72c2-bdde4cf85b46@ipfire.org> (raw)
In-Reply-To: <20220222121806.1208994-2-michael.tremer@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 2720 bytes --]

Reviewed-by: Peter Müller <peter.mueller(a)ipfire.org>

> This is being replaced by adding the MTU option to any routes that
> dhcpcd installs.
> 
> Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
> ---
>   config/dhcpc/dhcpcd-hooks/10-mtu | 33 --------------------------------
>   config/rootfiles/common/dhcpcd   |  1 -
>   lfs/dhcpcd                       |  1 -
>   3 files changed, 35 deletions(-)
>   delete mode 100644 config/dhcpc/dhcpcd-hooks/10-mtu
> 
> diff --git a/config/dhcpc/dhcpcd-hooks/10-mtu b/config/dhcpc/dhcpcd-hooks/10-mtu
> deleted file mode 100644
> index 8eb429751..000000000
> --- a/config/dhcpc/dhcpcd-hooks/10-mtu
> +++ /dev/null
> @@ -1,33 +0,0 @@
> -# Configure the MTU for the interface
> -
> -eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
> -
> -set_mtu()
> -{
> -	local mtu=$1
> -	ip link set "$interface" mtu "$mtu"
> -
> -	# test for buggy nic that lose link at mtu set...
> -	carrier=`cat /sys/class/net/$interface/carrier`
> -	if [ "$carrier" == "0" ]; then
> -		syslog info "Warning! Carrier loss after MTU set. Reinit needed..."
> -		ip link set "$interface" down
> -		ip link set "$interface" up
> -		exit 1
> -	fi
> -}
> -
> -if [ -n "$new_interface_mtu" ] && $if_up; then
> -	if [ $RED_DHCP_FORCE_MTU -ge 576 ]; then
> -		new_interface_mtu=$RED_DHCP_FORCE_MTU
> -	fi
> -	if [ ! "$new_interface_mtu" == "$ifmtu" ]; then
> -		# The smalled MTU dhcpcd can work with is 576
> -		if [ "$new_interface_mtu" -gt 576 ]; then
> -			if set_mtu "$new_interface_mtu"; then
> -				syslog info "MTU set to $new_interface_mtu"
> -			fi
> -		fi
> -	fi
> -fi
> -
> diff --git a/config/rootfiles/common/dhcpcd b/config/rootfiles/common/dhcpcd
> index 672a47a30..d36b105f1 100644
> --- a/config/rootfiles/common/dhcpcd
> +++ b/config/rootfiles/common/dhcpcd
> @@ -9,7 +9,6 @@ var/ipfire/dhcpc/dhcpcd-hooks
>   #var/ipfire/dhcpc/dhcpcd-hooks/00-linux
>   #var/ipfire/dhcpc/dhcpcd-hooks/01-test
>   #var/ipfire/dhcpc/dhcpcd-hooks/02-dump
> -#var/ipfire/dhcpc/dhcpcd-hooks/10-mtu
>   #var/ipfire/dhcpc/dhcpcd-hooks/30-hostname
>   #var/ipfire/dhcpc/dhcpcd-hooks/70-dhcpcd.exe
>   var/ipfire/dhcpc/dhcpcd-run-hooks
> diff --git a/lfs/dhcpcd b/lfs/dhcpcd
> index 8c4a593ad..8291d076a 100644
> --- a/lfs/dhcpcd
> +++ b/lfs/dhcpcd
> @@ -90,7 +90,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
>   	rm -f $(CONFIG_ROOT)/dhcpc/dhcpcd-hooks/50-ypbind
>   
>   	install -m 644 $(DIR_SRC)/config/dhcpc/dhcpcd.conf $(CONFIG_ROOT)/dhcpc/
> -	install -m 444 $(DIR_SRC)/config/dhcpc/dhcpcd-hooks/10-mtu $(CONFIG_ROOT)/dhcpc/dhcpcd-hooks
>   
>   	chown root:root $(CONFIG_ROOT)/dhcpc/dhcpcd.conf
>   

  reply	other threads:[~2022-02-22 19:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 12:18 [PATCH 1/3] dhcpcd: Force setting MTU through dhcpcd Michael Tremer
2022-02-22 12:18 ` [PATCH 2/3] dhcpcd: Remove old MTU setting script Michael Tremer
2022-02-22 19:16   ` Peter Müller [this message]
2022-02-22 12:18 ` [PATCH 3/3] dhcpcd: Allow freely setting MTU Michael Tremer
2022-02-22 19:17   ` Peter Müller
2022-02-22 19:16 ` [PATCH 1/3] dhcpcd: Force setting MTU through dhcpcd Peter Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a421ddd0-48f3-87ab-72c2-bdde4cf85b46@ipfire.org \
    --to=peter.mueller@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox