Page MenuHomeFreeBSD

linuxulator: map IFF_LOWER_UP through NETLINK_ROUTE for Linux apps
ClosedPublic

Authored by dteske on Mon, Aug 10, 10:25 PM.
Tags
None
Referenced Files
F170791324: D58774.id183840.diff
Sun, Sep 6, 3:54 PM
F170728652: D58774.diff
Sun, Sep 6, 6:22 AM
F170704477: D58774.id183891.diff
Sun, Sep 6, 3:03 AM
F170699491: D58774.id183891.diff
Sun, Sep 6, 2:24 AM
Unknown Object (File)
Sat, Sep 5, 9:18 PM
Unknown Object (File)
Sat, Sep 5, 11:27 AM
Unknown Object (File)
Sat, Sep 5, 3:12 AM
Unknown Object (File)
Sat, Sep 5, 3:07 AM
Subscribers

Details

Summary

rtnl_if_flags_to_linux() translated the usual IFF_* bits but dropped
FreeBSD's IFF_LOWER_UP (IFF_NETLINK_1). Chromium's AddressTrackerLinux
only treats a link as online when ifi_flags has UP|LOWER_UP|RUNNING; with
LOWER_UP missing, online_links stays empty, ConnectionType is
CONNECTION_NONE, and navigator.onLine is false even though TCP/HTTPS
work. Linux Chromium under the Linuxulator (e.g. www/linux-brave) then
shows a spurious Offline UI; sites that ignore navigator.onLine do not.
Native www/chromium is on a different notifier path.

Map IFF_LOWER_UP to Linux's IFF_LOWER_UP (1<<16) and define
LINUX_IFF_LOWER_UP alongside the existing LINUX_IFF_* constants.

PR: 297424

Test Plan
  • litmus (NETLINK_ROUTE + Chromium heuristic) before: OFFLINE
  • after rebuild+reload linux_common: LOWER_UP present, ONLINE
  • linux-brave: navigator.onLine true; Netflix Offline banner gone

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/compat/linux/linux_netlink.c
346

do we need this comment? IFF_LOWER_UP -> LINUX_IFF_LOWER_UP seems sensible on its own.

This revision is now accepted and ready to land.Tue, Aug 11, 5:14 PM