It was <2025-04-18 pią 00:35>, when EpicTux123 wrote:

> I had the following file in my system:
>
> /etc/sysctl.d/90-custom-mtu-probing.conf
> net.ipv4.tcp_mtu_probing=1
>
> I deleted that file and rebooted my system.  But the
> "net.ipv4.tcp_mtu_probing" value is still "1", even though its default
> is "0".
>
> I have tried to use "sudo sysctl -w net.ipv4.tcp_mtu_probing=0" and
> "echo 0 > /proc/sys/net/ipv4/tcp_mtu_probing" (as sudo), but it still
> gets reverted to "1" after reboot.

The values set in kernel are volatile. That is what the sysctl
configuration files are for - to "preserve" desired values across
reboots (actually to set variables to non-default values on every
reboot.)

> My intention is to go back to its default, which is "0", without
> having to create a custom override for it (which should be happening).
>
> I have ran "sudo sysctl --system" and it does not appear there. I have
> checked all system-wide locations for sysctl.d/sysctl.conf
> files/directories and also nothing there.

There is a chance something else sets the value to one during
reboot. It's just a matter of writing "1" to the proc file. Any
privileged service can do it. You may need to dig through your services
and try to figure out which one does it for example by disabling it. But first…

There is a chance (I don't know your distribution) the value may be set
from your initramfs. Try unpacking it and seeking for sysctl
configuration there.

> The kernel itself is not very clear about the default value of this
> parameter (I couldn't find it, at least).

The default value is 0 because it's stored in a field of a global
variable[1] and global variables are initialized to 0.

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/core/net_namespace.c?h=v6.14#n48

-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

Attachment: signature.asc
Description: PGP signature

Reply via email to