On Tue, Jun 3, 2014 at 8:58 PM, Lennart Poettering <lenn...@poettering.net> wrote: > On Mon, 02.06.14 21:02, Tom Gundersen (t...@jklm.no) wrote: > >> On Mon, Jun 2, 2014 at 8:47 PM, Reventlov >> <contact+systemd...@volcanis.me> wrote: >> > Since network files are applied to links whenever the links >> > appear, how do systemd manage the "disappearance" of a default route ? >> >> You can have several default routes, so we just configure them all and >> let the kernel handle it for us. We probably should improve the config >> options to make it possible to override the priority of the routes. > > Windows initializes the route metric value for each route from the > "speed" of the interface. If there are multiple links and for one we > know it's a gigabit ethernet link, and the other is a 54mbit wlan link, > then the former would automatically get preference... it's a bit black > magic, but kinda cool black magic i think... > > that said, i am not sure we even have a sane API to determine the speed > of links... maybe ethtool reports it at least for wired ethernet? but > for wlan?
I suppose we could figure out the link speed in various ways, but how useful is that going to be? I mean the _actual_ speed may be entirely unrelated? I guess it is an ok hack if we have no other info (currently it is basically random), though I would be a lot more excited about it if there was a unified (and preferably sane) API to getting this info. If anyone would hack up a patch, I'd not object :) -t _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel