if-up.d files do not have effect on ubuntu 24.04 LTS

Bug #2064093 reported by francesco
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
Confirmed
Undecided
Unassigned
network-manager (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Some time ago I wrote a detailed answer to fix an error for lowering MTU size for a cisco-compatible VPN (here:https://unix.stackexchange.com/questions/768757/unable-to-ssh-into-remote-machine-but-able-to-ping-vpnc/768758#768758)

After upgrading to Ubuntu 24.04 LTS, I'm unable with the same steps to lower the MTU size.

In particular, if I run the following command from the terminal

sudo ifconfig your_tunnel_name mtu 1370 up

it seems to lower the MTU size.

However, the script under /etc/network/if-up.d is not automatically triggered.

Does something change with the newer Ubuntu version?

Tags: 24.04
francesco (u-user-prop)
affects: ubuntu → network-manager (Ubuntu)
summary: - if-up.d files does not have effect on ubuntu 24.04 LTS
+ if-up.d files do not have effect on ubuntu 24.04 LTS
Revision history for this message
Lukas Märdian (slyon) wrote :

You filed the bug report against NetworkManager. But the "up.d" hook is called differently in NM, see https://netplan.io/faq#use-pre-up-post-up-etc-hook-scripts

If this is about /etc/network/if-up.d then it should be targeted towards the "ifupdown" package. I'm adding a corresponding bug task.

Revision history for this message
francesco (u-user-prop) wrote :

Thanks Lukas!

Revision history for this message
Miroslav Zaťko (mirec-z) wrote (last edit ):

Triggering if-up.d scripts changed completely without mention in documentation.
For 23.10 scripts was triggered for each network interface separately. On boot it was with

* PHASE=post-up, IFACE=lo;
* PHASE=post-up, IFACE=virbr0;
* PHASE=post-up, IFACE=enx047bcb671ca9;
* PHASE=post-up, IFACE=docker0;
* PHASE=post-up, IFACE=wlp0s20f3

Later on connecting to openconnect/anyconnect it was triggered with
* PHASE=post-up, IFACE=vpn0

After upgrade to 24.04 it is triggered on boot only with:
* PHASE=post-up, IFACE=lo;
* PHASE=post-up, IFACE=-all

Nothing triggered after connecting to openconnect/anyconnect

https://bugs.launchpad.net/openconnect/+bug/2064028

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ifupdown (Ubuntu):
status: New → Confirmed
Changed in network-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Nicolas (bibi-tofu) wrote :

It also looks like on 24.04, the if-up.d scripts aren't run at all when resuming from sleep.

Before 24.04:
- Boot
- My if-up.d script that triggers for "IFACE=wlp0s20f3" gets properly triggered (it adds an IP alias to this interface using "ip addr add").
- Put ubuntu to sleep
- Resume ubuntu
- My if-up.d script that triggers for "IFACE=wlp0s20f3" gets properly triggered.

After 24.04:
- Boot
- My if-up.d script that triggers for "IFACE=wlp0s20f3" gets properly triggered (it adds an IP alias to this interface using "ip addr add"). Apparently I could fix this by triggering this script with "IFACE=-all". For now I manually run the "ip addr add" command.
- Put ubuntu to sleep
- Resume ubuntu
- My if-up.d script that triggers for "IFACE=wlp0s20f3" is not called (not even with "IFACE=-all"). The IP alias disappeared, so the interface did go down and get back up, but the script wasn't called at all. For this I don't think I have a fix?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.