blob: 78ba4916c10d884b96a9cb2d57a661e87776475e [file] [log] [blame]
Lorenz Brund842aaf2025-02-17 17:39:46 +01001
Lorenz Brun333cb8b2023-04-20 23:10:39 +02002A few virtual drivers (bonding, dummy) predate netlink (~2003), which means that
3the kernel had no way to dynamically create network interfaces.
4The solution was kernel module paramter which statically precreated a list of
5these virtual interfaces. The number was generally set to 1 by default, meaning
6that loading the module creates one of its interface.
7
8For compatibility with legacy userspaces this is still kept around. We could
9set the parameters to zero, but doing that everywhere is a pain. This just
10patches the default values to zero.
11
12diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
13index c4b1b0aa438a..06b00f7a8eab 100644
14--- a/drivers/net/dummy.c
15+++ b/drivers/net/dummy.c
16@@ -43,7 +43,7 @@
17
18 #define DRV_NAME "dummy"
19
20-static int numdummies = 1;
21+static int numdummies = 0;
22
23 /* fake multicast ability */
24 static void set_multicast_list(struct net_device *dev)
25diff --git a/include/uapi/linux/if_bonding.h b/include/uapi/linux/if_bonding.h
26index d174914a837d..bf8e2af101a3 100644
27--- a/include/uapi/linux/if_bonding.h
28+++ b/include/uapi/linux/if_bonding.h
29@@ -82,7 +82,7 @@
30 #define BOND_STATE_ACTIVE 0 /* link is active */
31 #define BOND_STATE_BACKUP 1 /* link is backup */
32
33-#define BOND_DEFAULT_MAX_BONDS 1 /* Default maximum number of devices to support */
34+#define BOND_DEFAULT_MAX_BONDS 0 /* Default maximum number of devices to support */
35
36 #define BOND_DEFAULT_TX_QUEUES 16 /* Default number of tx queues per device */
37