[systemd-devel] networkd: Support setting mtu / mac address by interface name

Tom Gundersen teg at jklm.no
Thu Dec 4 02:20:13 PST 2014


On Thu, Dec 4, 2014 at 3:50 AM, Lennart Poettering
<lennart at poettering.net> wrote:
> Tom, I think it would make sense to allow Name= matches in the [Match]
> section of .link files, no?

Hm, so far I hesitated, as the most common scenarios is the one that
William has, namely to want to match on the name set by udev and not
the one set by the kernel. This we cannot really do in .link files as
it would be confusing for admins to figure out exactly what is being
matched on, and it could obviously become undecidable/nonterminating
depending on how we try to implement it.

> I mean, most of the times .link files are
> used to choose the name depending on other fields, but I think in all
> cases where the name is chosen at creation time of an interface (like
> for example for veth links), it should be Ok to match links based on
> the name they already have?

So this we could do (i.e., allow name matches if and only if the name
is set at creation time). Though, if the name is set at creation time,
shouldn't also all the other properties have been? Moreover, if we
give people this feature I'm pretty sure we'll get lots of people
expecting it to work also for any other sort of name and getting
confused when it doesn't.

So overall, not really convinced, but if there is a usecase for
matching on such limited types of names, I'm not very strongly against
it.

-t


More information about the systemd-devel mailing list