lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 28 Aug 2011 21:48:35 +0600
From:	"Alexander E. Patrakov" <patrakov@...il.com>
To:	Jan Kundrát <jkt@...ska.net>
CC:	linux-kernel@...r.kernel.org
Subject: Re: IPv6: metrics of default routes on different interfaces (Ethernet
 vs. wifi)

28.08.2011 21:02, Jan Kundrát wrote:
> I'm assuming here that the metrics of the default routes are somehow
> derived from the "kind" of the underlying network interface, so that a
> gigabit Ethernet is preferred over a 100Mbps one, which is preferred
> over a 10Mbps one, etc. Please correct me if I'm wrong and the metrics
> have a different origin, or if the wired-ethernet-preference it's just a
> pure luck.

> I've tried grepping my kernel sources, but wasn't able to find out the
> place where the interface type is used in metric assignment.

It is not in the kernel. You have to grep through the source of whatever 
utility you are using to configure your interfaces. For dhcpcd, the code 
is around line 200 in net.c:

         /* We reserve the 100 range for virtual interfaces, if and when
          * we can work them out. */
         iface->metric = 200 + if_nametoindex(iface->name);
         if (getifssid(ifname, iface->ssid) != -1) {
                 iface->wireless = 1;
                 iface->metric += 100;
         }

but this doesn't match the metrics that you have. So I assume you use 
some other tool.

-- 
Alexander E. Patrakov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ