Skip to content

BUSYBOX: ifplug does not read args from ifplugd.conf - #115

Open
nleuenberger-zb wants to merge 1 commit into
STMicroelectronics:scarthgapfrom
nleuenberger-zb:fix-ifplugd-crash
Open

BUSYBOX: ifplug does not read args from ifplugd.conf#115
nleuenberger-zb wants to merge 1 commit into
STMicroelectronics:scarthgapfrom
nleuenberger-zb:fix-ifplugd-crash

Conversation

@nleuenberger-zb

Copy link
Copy Markdown

Hi there!

We observed an issue that happens when:

  • this default busybox/ifplugd recipe is used
  • no systemd (we used sysvinit)
  • the ethernet iface gets assigned two ip addresses (e.g. one static + one dhcp)
  • the ethernet cable was plugged but then gets unplugged for more than 10 seconds

In this case the ifplugd.action fails with exit 1 and the ifplugd service is terminated:

[ 1077.436072] stm32-dwmac 5800a000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
ifplugd(eth0): link is up
[ 1079.514909] stm32-dwmac 5800a000.ethernet eth0: Link is Down
ifplugd(eth0): link is down
ifplugd(eth0): executing '/etc/ifplugd/ifplugd.action eth0 down'
ifplugd down
ip: can't send flush request: Cannot assign requested address
ifplugd(eth0): exit code: 1
ifplugd(eth0): exiting

This results in a dead eth0 port. The link is not brought up. Only a manual ifup eth0 resolves the issue.

The root cause seems to be that the busybox version of ifplugd does not read the supplied ifplugd.conf. Therefore the -I that makes it ignore failures of the ifplugd.action script is not enabled.

I've removed the superfluous config file and rolled the relevant arguments (busybox does not support -f and -w) into the start script. Note that I have no idea how this affects systemd enabled systems. But given the if systemd=0 check then I conclude that this is anyway only used for non-systemd.

Let me know if anything else shall be changed or tested more in-depth.
I'm happy to make any required changes.

Cheers, Nik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant