Lorenz Brun | 333cb8b | 2023-04-20 23:10:39 +0200 | [diff] [blame] | 1 | A few virtual drivers (bonding, dummy) predate netlink (~2003), which means that |
| 2 | the kernel had no way to dynamically create network interfaces. |
| 3 | The solution was kernel module paramter which statically precreated a list of |
| 4 | these virtual interfaces. The number was generally set to 1 by default, meaning |
| 5 | that loading the module creates one of its interface. |
| 6 | |
| 7 | For compatibility with legacy userspaces this is still kept around. We could |
| 8 | set the parameters to zero, but doing that everywhere is a pain. This just |
| 9 | patches the default values to zero. |
| 10 | |
| 11 | diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c |
| 12 | index 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) |
| 24 | diff --git a/include/uapi/linux/if_bonding.h b/include/uapi/linux/if_bonding.h |
| 25 | index 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 | |