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