From: Hans Dedecker Date: Mon, 14 Sep 2020 19:55:01 +0000 (+0200) Subject: vxlan: add extra config options X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=036221ce5a899eb99ef1c1623fc9460af00a69e7;p=openwrt%2Fstaging%2Fdedeckeh.git vxlan: add extra config options Add config options: srcportmin/srcportmax : range of port numbers to use as UDP source ports to communicate to the remote VXLAN tunnel endpoint ageing : lifetime in seconds of FDB entries learnt by the kernel maxaddress : maximum number of FDB entries learning : enable/disable entering unknown source link layer addresses and IP addresses into the VXLAN device FDB. rsc : enable/disable route short circuit proxy : enable/disable ARP proxy l2miss : enable/disable netlink LLADDR miss notifications l3miss : enable/disable netlink IP ADDR miss notifications gbp : enable/disable the Group Policy extension Signed-off-by: Hans Dedecker --- diff --git a/package/network/config/vxlan/Makefile b/package/network/config/vxlan/Makefile index 7232f71b45..eb053bf111 100644 --- a/package/network/config/vxlan/Makefile +++ b/package/network/config/vxlan/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vxlan -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/config/vxlan/files/vxlan.sh b/package/network/config/vxlan/files/vxlan.sh index d063c47d47..8b3a0a53d4 100755 --- a/package/network/config/vxlan/files/vxlan.sh +++ b/package/network/config/vxlan/files/vxlan.sh @@ -59,8 +59,8 @@ vxlan_generic_setup() { local link="$cfg" - local port vid ttl tos mtu macaddr zone rxcsum txcsum - json_get_vars port vid ttl tos mtu macaddr zone rxcsum txcsum + local port vid ttl tos mtu macaddr zone rxcsum txcsum srcportmin srcportmax ageing maxaddress learning proxy l2miss l3miss gbp + json_get_vars port vid ttl tos mtu macaddr zone rxcsum txcsum srcportmin srcportmax ageing maxaddress learning proxy l2miss l3miss gbp proto_init_update "$link" 1 @@ -78,9 +78,20 @@ vxlan_generic_setup() { json_add_object 'data' [ -n "$port" ] && json_add_int port "$port" [ -n "$vid" ] && json_add_int id "$vid" + [ -n "$srcportmin" ] && json_add_int srcportmin "$srcportmin" + [ -n "$srcportmax" ] && json_add_int srcportmax "$srcportmax" + [ -n "$ageing" ] && json_add_int ageing "$ageing" + [ -n "$maxaddress" ] && json_add_int maxaddress "$maxaddress" [ -n "$macaddr" ] && json_add_string macaddr "$macaddr" [ -n "$rxcsum" ] && json_add_boolean rxcsum "$rxcsum" [ -n "$txcsum" ] && json_add_boolean txcsum "$txcsum" + [ -n "$learning" ] && json_add_boolean learning "$learning" + [ -n "$rsc" ] && json_add_boolean rsc "$rsc" + [ -n "$proxy" ] && json_add_boolean proxy "$proxy" + [ -n "$l2miss" ] && json_add_boolean l2miss "$l2miss" + [ -n "$l3miss" ] && json_add_boolean l3miss "$l3miss" + [ -n "$gbp" ] && json_add_boolean gbp "$gbp" + json_close_object proto_close_tunnel @@ -163,9 +174,20 @@ vxlan_generic_init_config() { proto_config_add_int "ttl" proto_config_add_int "tos" proto_config_add_int "mtu" + proto_config_add_int "srcportmin" + proto_config_add_int "srcportmax" + proto_config_add_int "ageing" + proto_config_add_int "maxaddress" proto_config_add_boolean "rxcsum" proto_config_add_boolean "txcsum" + proto_config_add_boolean "learning" + proto_config_add_boolean "rsc" + proto_config_add_boolean "proxy" + proto_config_add_boolean "l2miss" + proto_config_add_boolean "l3miss" + proto_config_add_boolean "gbp" proto_config_add_string "macaddr" + } proto_vxlan_init_config() {