summaryrefslogtreecommitdiff
path: root/drivers/ipoe/ipoe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ipoe/ipoe.c')
-rw-r--r--drivers/ipoe/ipoe.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c
index 251fec96..47dc6955 100644
--- a/drivers/ipoe/ipoe.c
+++ b/drivers/ipoe/ipoe.c
@@ -1135,7 +1135,7 @@ static int ipoe_ctrl_attached(void)
/* Sessions are created through IPOE_CMD_CREATE, which also sets up the
* private state. A device made by rtnetlink would have none of it, so
* refuse 'ip link add ... type ipoe' explicitly. */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,13,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,15,0)
static int ipoe_newlink(struct net_device *dev,
struct rtnl_newlink_params *params,
struct netlink_ext_ack *extack)
@@ -1215,9 +1215,11 @@ static void ipoe_netdev_setup(struct net_device *dev)
dev->iflink = 0;
#endif
dev->addr_len = ETH_ALEN;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,15,0)
+ /* HAVE_NETNS_* come from the Makefile header probe; the version
+ * checks are only a fallback when the probe could not run. */
+#if defined(HAVE_NETNS_IMMUTABLE) || LINUX_VERSION_CODE >= KERNEL_VERSION(6,15,0)
dev->netns_immutable = true;
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(6,12,0)
+#elif defined(HAVE_NETNS_LOCAL) || LINUX_VERSION_CODE >= KERNEL_VERSION(6,12,0)
dev->netns_local = true;
#else
dev->features |= NETIF_F_NETNS_LOCAL;