From 04b67d49254d956d31bcfe80340fb9df7ed332d3 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Tue, 15 Jul 2014 17:57:43 +0200 Subject: udev: link_setup - respect kernel name assign policy Newer kernels export meta-information about the origin of an ifname. Respect this from the ifname rename logic. We do not rename any interfaces that was originally named by userspace, nor once which have already been renamed from userspace. Moreover, we optionally do not (the default) rename interfaces which the kernel claims to have named in a predictable way. --- src/shared/missing.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/shared/missing.h') diff --git a/src/shared/missing.h b/src/shared/missing.h index e20f9bdfd3..195edfc672 100644 --- a/src/shared/missing.h +++ b/src/shared/missing.h @@ -525,3 +525,23 @@ static inline int setns(int fd, int nstype) { #ifndef BOND_XMIT_POLICY_ENCAP34 #define BOND_XMIT_POLICY_ENCAP34 4 #endif + +#ifndef NET_ADDR_RANDOM +# define NET_ADDR_RANDOM 1 +#endif + +#ifndef NET_NAME_ENUM +# define NET_NAME_ENUM 1 +#endif + +#ifndef NET_NAME_PREDICTABLE +# define NET_NAME_PREDICTABLE 2 +#endif + +#ifndef NET_NAME_USER +# define NET_NAME_USER 3 +#endif + +#ifndef NET_NAME_RENAMED +# define NET_NAME_RENAMED 4 +#endif -- cgit v1.2.3-54-g00ecf