Skip to content

Keep link-local-only services from displacing the default

Grant Erickson connman 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4service: Rank link-local-only services below others in 'service_compare'src/service.c+137 -00 replies
2/4service: Rank link-local-only services below others when reorderingsrc/service.c+16 -30 replies
3/4service: Re-sort when a connected service's link-local-only state changessrc/service.c+117 -30 replies
4/4doc: Describe link-local-only services under PreferredTechnologiesdoc/connman.conf.5.in+6 -10 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchJohannes Emerich
SeriesT-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] Keep link-local-only services from displacing the default

When DHCP gets no lease, connman falls back to IPv4 link-local addressing and the service becomes "ready" with a "default dev <interface> scope link" route and no gateway. Ethernet cabled directly to a phone or laptop, or to a switch with nothing else on it, ends up this way. It reaches only its own link and never passes an online check.

With PreferredTechnologies listing ethernet first, such a service outranks an "online" Wi-Fi or cellular service: 'service_compare' and 'service_update_preferred_order' consult PreferredTechnologies before online-over-ready. Ethernet takes the default route, Wi-Fi is demoted to "ready", and only Ethernet is online checked. The system is offline until Ethernet meets the online check failures threshold, every time such a cable is plugged in, and at every start with one plugged in.

This series ranks a service connected only by link-local addressing below any connected service that can reach beyond its link, whatever its technology, in both places. For IPv4 that means connected with the "auto" (IPv4 link-local) method; for IPv6 it means not connected, since connman drops IPv6 link-local addresses as they arrive and becomes "ready" for IPv6 only with some other address. It also re-sorts when a connected service gains or loses that reach with no change in its state, as when a DHCP server later appears on the link of a link-local-only Ethernet service. A link-local-only service alone is still the default, as before.

The IPv4 test keys on the method, not on the gateway address, because point-to-point links such as many cellular bearers have no gateway either but reach beyond their link.

Note: This adds a new log entry: "Interface <name> [ <type> ] is now link-local only" and "... is no longer link-local only" once per change.

Grant Erickson (4):
service: Rank link-local-only services below others in
'service_compare'
service: Rank link-local-only services below others when reordering
service: Re-sort when a connected service's link-local-only state
changes
doc: Describe link-local-only services under PreferredTechnologies

 doc/connman.conf.5.in |   7 +-
 src/service.c         | 276 +++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 276 insertions(+), 7 deletions(-)
Signature · 1 line
2.52.0