From 55a7b6b7f2f773c06a79cb7359ffdab54ba32450 Mon Sep 17 00:00:00 2001 From: Johannes Kimmel Date: Fri, 4 Sep 2020 04:59:43 +0200 Subject: netifd: vxlan: add aging and maxaddress options For both options the values can just be passed to the kernel. All unsigned values are accepted, thus no range checking required. Signed-off-by: Johannes Kimmel --- system-linux.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'system-linux.c') diff --git a/system-linux.c b/system-linux.c index c232c5f..6778b1d 100644 --- a/system-linux.c +++ b/system-linux.c @@ -3235,6 +3235,16 @@ static int system_add_vxlan(const char *name, const unsigned int link, struct bl system_vxlan_map_bool_attr(msg, tb_data, IFLA_VXLAN_L3MISS , VXLAN_DATA_ATTR_L3MISS, false); system_vxlan_map_bool_attr(msg, tb_data, IFLA_VXLAN_GBP , VXLAN_DATA_ATTR_GBP, false); + if ((cur = tb_data[VXLAN_DATA_ATTR_AGEING])) { + uint32_t ageing = blobmsg_get_u32(cur); + nla_put_u32(msg, IFLA_VXLAN_AGEING, ageing); + } + + if ((cur = tb_data[VXLAN_DATA_ATTR_LIMIT])) { + uint32_t maxaddress = blobmsg_get_u32(cur); + nla_put_u32(msg, IFLA_VXLAN_LIMIT, maxaddress); + } + if ((cur = tb[TUNNEL_ATTR_TOS])) { char *str = blobmsg_get_string(cur); unsigned tos = 1; -- cgit v1.2.1