diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/geneve.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index 6625fabe2c88..82eccc930c5c 100644 --- a/drivers/net/geneve.c +++ b/drivers/net/geneve.c @@ -1325,11 +1325,15 @@ static int geneve_nl2info(struct nlattr *tb[], struct nlattr *data[], info->key.tun_id = tunid; } - if (data[IFLA_GENEVE_TTL]) + if (data[IFLA_GENEVE_TTL_INHERIT]) { + if (nla_get_u8(data[IFLA_GENEVE_TTL_INHERIT])) + *ttl_inherit = true; + else + *ttl_inherit = false; + } else if (data[IFLA_GENEVE_TTL]) { info->key.ttl = nla_get_u8(data[IFLA_GENEVE_TTL]); - - if (data[IFLA_GENEVE_TTL_INHERIT]) - *ttl_inherit = true; + *ttl_inherit = false; + } if (data[IFLA_GENEVE_TOS]) info->key.tos = nla_get_u8(data[IFLA_GENEVE_TOS]); |