diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2013-11-19 12:17:05 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-12-08 18:43:51 +0100 |
commit | e757e7d352a244e20a0c32fec96b35e5893d62ea (patch) | |
tree | f6ad5b1f5678442a2ff07fe380d2baa6838d0b3c /system-linux.c | |
parent | c397d2788ffd27904ab89e437432b481c6e7e806 (diff) |
netifd: Apply tunnel MTU
Tunnel MTU is applied according to the tunnel MTU UCI parameter
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'system-linux.c')
-rw-r--r-- | system-linux.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/system-linux.c b/system-linux.c index d01d7e3..58210a6 100644 --- a/system-linux.c +++ b/system-linux.c @@ -1435,8 +1435,11 @@ int system_add_ip_tunnel(const char *name, struct blob_attr *attr) str = blobmsg_data(cur); unsigned int ttl = 0; - if ((cur = tb[TUNNEL_ATTR_TTL]) && (ttl = blobmsg_get_u32(cur)) > 255) - return -EINVAL; + if ((cur = tb[TUNNEL_ATTR_TTL])) { + ttl = blobmsg_get_u32(cur); + if (ttl > 255) + return -EINVAL; + } unsigned int link = 0; if ((cur = tb[TUNNEL_ATTR_LINK])) { |