[ovs-dev] [PATCH] datapath: Always include tunnel TTL in serialized Netlink attributes.

Jesse Gross jesse at nicira.com
Tue Jul 9 23:51:04 UTC 2013


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 <azhou at nicira.com>
Signed-off-by: Jesse Gross <jesse at nicira.com>
---
 datapath/flow.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/datapath/flow.c b/datapath/flow.c
index 45b85ab..a70b974 100644
--- a/datapath/flow.c
+++ b/datapath/flow.c
@@ -1289,8 +1289,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 & TUNNEL_DONT_FRAGMENT) &&
 		nla_put_flag(skb, OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT))
-- 
1.8.1.2




More information about the dev mailing list