Revert "Always rename an interface to its name specified in config if no NamePolicy...
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 16 Jan 2019 12:28:41 +0000 (13:28 +0100)
committerMartin Pitt <mpitt@debian.org>
Sun, 27 Jan 2019 21:33:07 +0000 (21:33 +0000)
commit2fd93efaf66c7c440e25f9724129caba9f28184d
treec08789f0235f48c6923ad071f69f77639f3e56ab
parent8d81e4f81233cbbabe5fa909ca52cc71c73c81b7
Revert "Always rename an interface to its name specified in config if no NamePolicy= is specified"

This reverts commit 55b6530baacf4658a183b15b010a8cf3483fde08.

This commit description says "Always rename an interface to its name specified
in config if no NamePolicy= is specified", but it does much more:
1. It completely changes the meaning of NamePolicy=kernel. Before, it meant that an interface
   with type==NAMEPOLICY_KERNEL would not be renamed. After, the kernel name only works as
   a fallback, if no policy matches.
2. The "if no NamePolicy= is specified" part is not true at all, the interface will be renamed
   according to the specified NamePolicy=.

After 55b6530baacf, the should_rename() function is named very misleadingly: it is only used
to mean "respect kernel predictable name if no naming policy matches".

Let's revert, and start with a clean slate. This fixes #11436.

(cherry picked from commit ed30802324365dde6c05d0b7c3ce1a0eff3bf571)

Gbp-Pq: Name Revert-Always-rename-an-interface-to-its-name-specified-i.patch
src/udev/net/link-config.c