瀏覽代碼

kernel: add kmod-ipvlan support

This kmod is similar to macvlan with the difference being that the
endpoints have the same mac address.

It is useful on cloud where only one mac address allowed on port,
where macvlan not works but ipvlan would.

One use case is where multiple IPs and gateways assign on one net port

Signed-off-by: Chen Minqiang <[email protected]>
Chen Minqiang 4 年之前
父節點
當前提交
e219b7f38b
共有 3 個文件被更改,包括 18 次插入0 次删除
  1. 16 0
      package/kernel/linux/modules/netdevices.mk
  2. 1 0
      target/linux/generic/config-5.10
  3. 1 0
      target/linux/generic/config-5.4

+ 16 - 0
package/kernel/linux/modules/netdevices.mk

@@ -885,6 +885,22 @@ endef
 $(eval $(call KernelPackage,macvlan))
 $(eval $(call KernelPackage,macvlan))
 
 
 
 
+define KernelPackage/ipvlan
+  SUBMENU:=$(NETWORK_DEVICES_MENU)
+  TITLE:=IP-VLAN support
+  KCONFIG:=CONFIG_IPVLAN
+  FILES:=$(LINUX_DIR)/drivers/net/ipvlan/ipvlan.ko
+  AUTOLOAD:=$(call AutoProbe,ipvlan)
+endef
+
+define KernelPackage/ipvlan/description
+ A kernel module which allows one to create virtual interfaces that
+ map packets to or from specific IP addresses to a particular interface
+endef
+
+$(eval $(call KernelPackage,ipvlan))
+
+
 define KernelPackage/tulip
 define KernelPackage/tulip
   TITLE:=Tulip family network device support
   TITLE:=Tulip family network device support
   DEPENDS:=@PCI_SUPPORT +kmod-mii
   DEPENDS:=@PCI_SUPPORT +kmod-mii

+ 1 - 0
target/linux/generic/config-5.10

@@ -2662,6 +2662,7 @@ CONFIG_IPV6_NDISC_NODETYPE=y
 # CONFIG_IPV6_TUNNEL is not set
 # CONFIG_IPV6_TUNNEL is not set
 # CONFIG_IPV6_VTI is not set
 # CONFIG_IPV6_VTI is not set
 # CONFIG_IPVLAN is not set
 # CONFIG_IPVLAN is not set
+# CONFIG_IPVTAP is not set
 # CONFIG_IPW2100 is not set
 # CONFIG_IPW2100 is not set
 # CONFIG_IPW2100_DEBUG is not set
 # CONFIG_IPW2100_DEBUG is not set
 CONFIG_IPW2100_MONITOR=y
 CONFIG_IPW2100_MONITOR=y

+ 1 - 0
target/linux/generic/config-5.4

@@ -2434,6 +2434,7 @@ CONFIG_IPV6_NDISC_NODETYPE=y
 # CONFIG_IPV6_TUNNEL is not set
 # CONFIG_IPV6_TUNNEL is not set
 # CONFIG_IPV6_VTI is not set
 # CONFIG_IPV6_VTI is not set
 # CONFIG_IPVLAN is not set
 # CONFIG_IPVLAN is not set
+# CONFIG_IPVTAP is not set
 # CONFIG_IPW2100 is not set
 # CONFIG_IPW2100 is not set
 # CONFIG_IPW2100_DEBUG is not set
 # CONFIG_IPW2100_DEBUG is not set
 CONFIG_IPW2100_MONITOR=y
 CONFIG_IPW2100_MONITOR=y