Skip to content

Conversation

@john-r-graham
Copy link
Contributor

@john-r-graham john-r-graham commented Aug 18, 2025

The code that reads interface status from the sysfs had stderr redirection in the wrong order, which means that, in the event that the interface does not yet exist, the read will display an error message that was meant to be suppressed.

Also added a single line that allows tun/tap interfaces to be properly handled. It turns out that /sys/class/net/${interface}/operstate shows "unknown" for tun/tap interfaces, not "up", which is the value that net-online depends on. So tun/tap interfaces need minor special handling.

@navi-desu
Copy link
Member

could you split this in two commits, one for the fix, and one for the tun/tap handling?

and name both commits accordingly

@john-r-graham
Copy link
Contributor Author

john-r-graham commented Aug 18, 2025

Certainly. But still one pull request?

@navi-desu
Copy link
Member

one pull request, yes

@john-r-graham john-r-graham force-pushed the net-online-tun-tap-support branch from 1b53e35 to 49eae02 Compare August 18, 2025 18:20
@john-r-graham
Copy link
Contributor Author

Done as requested.

The code that reads interface status from the sysfs had stderr redirection in
the wrong order, which means that, in the event that the interface does not yet
exist, the read will display an error message that was meant to be suppressed.
Added a single line that allows tun/tap interfaces to be properly handled. It
turns out that /sys/class/net/${interface}/operstate shows "unknown" for tun/tap
interfaces, not "up", which is the value that net-online depends on. So tun/tap
interfaces need minor special handling.
@john-r-graham john-r-graham force-pushed the net-online-tun-tap-support branch from 49eae02 to 01ba02e Compare August 20, 2025 14:02
@john-r-graham
Copy link
Contributor Author

john-r-graham commented Aug 20, 2025

Pushed again to correct a typo in a commit message. No code change.

@navi-desu navi-desu merged commit 6c3f879 into OpenRC:master Aug 23, 2025
7 checks passed
@navi-desu
Copy link
Member

thanks

john-r-graham added a commit to john-r-graham/jrg-overlay that referenced this pull request Oct 30, 2025
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.

2 participants