diff options
Diffstat (limited to 'sys/compat/linux/linux.c')
-rw-r--r-- | sys/compat/linux/linux.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/compat/linux/linux.c b/sys/compat/linux/linux.c index 5351575ed6e1..bf0479b89588 100644 --- a/sys/compat/linux/linux.c +++ b/sys/compat/linux/linux.c @@ -59,6 +59,11 @@ __FBSDID("$FreeBSD$"); CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ); +static bool use_real_ifnames = false; +SYSCTL_BOOL(_compat_linux, OID_AUTO, use_real_ifnames, CTLFLAG_RWTUN, + &use_real_ifnames, 0, + "Use FreeBSD interface names instead of generating ethN aliases"); + static int bsd_to_linux_sigtbl[LINUX_SIGTBLSZ] = { LINUX_SIGHUP, /* SIGHUP */ LINUX_SIGINT, /* SIGINT */ @@ -726,3 +731,10 @@ bsd_to_linux_poll_events(short bev, short *lev) *lev = bits; } + +bool +linux_use_real_ifname(const struct ifnet *ifp) +{ + + return (use_real_ifnames || !IFP_IS_ETH(ifp)); +} |