From: Jesse Gross Date: Tue, 9 Jul 2013 23:47:01 +0000 (-0700) Subject: datapath: Always include tunnel TTL in serialized Netlink attributes. X-Git-Tag: v1.11.0~38 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;ds=sidebyside;h=e877b1aadbd06783a09d32123674006538f958ed;p=cascardo%2Fovs.git datapath: Always include tunnel TTL in serialized Netlink attributes. There is no default value for the tunnel TTL so it must always be included in flow keys sent from userspace to kernel. The kernel should also respect this convertion when sending flows to userspace by always including the TTL in tunnel flows. CC: Andy Zhou Signed-off-by: Jesse Gross --- diff --git a/datapath/flow.c b/datapath/flow.c index ce755cedf..b9742a494 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -1287,8 +1287,7 @@ int ipv4_tun_to_nlattr(struct sk_buff *skb, if (output->ipv4_tos && nla_put_u8(skb, OVS_TUNNEL_KEY_ATTR_TOS, output->ipv4_tos)) return -EMSGSIZE; - if (output->ipv4_ttl && - nla_put_u8(skb, OVS_TUNNEL_KEY_ATTR_TTL, output->ipv4_ttl)) + if (nla_put_u8(skb, OVS_TUNNEL_KEY_ATTR_TTL, output->ipv4_ttl)) return -EMSGSIZE; if ((output->tun_flags & OVS_TNL_F_DONT_FRAGMENT) && nla_put_flag(skb, OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT))