From 29722bcc53774a763c583dfeec12af492a035008 Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Fri, 18 Mar 2011 14:37:33 -0700 Subject: [PATCH] datapath: Use ipv4_dst_hoplimit() instead of direct access. In 2.6.38 dst metrics became shared and use copy-on-write instead of using private versions. This means that it is no longer permissible to directly access the metric and we need to use the helper function instead. Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- datapath/tunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datapath/tunnel.c b/datapath/tunnel.c index a7d494378..7863b7a35 100644 --- a/datapath/tunnel.c +++ b/datapath/tunnel.c @@ -804,7 +804,7 @@ static void create_tunnel_header(const struct vport *vport, iph->saddr = rt->rt_src; iph->ttl = mutable->ttl; if (!iph->ttl) - iph->ttl = dst_metric(&rt_dst(rt), RTAX_HOPLIMIT); + iph->ttl = ip4_dst_hoplimit(&rt_dst(rt)); tnl_vport->tnl_ops->build_header(vport, mutable, iph + 1); } @@ -1233,7 +1233,7 @@ int tnl_send(struct vport *vport, struct sk_buff *skb) /* TTL */ ttl = mutable->ttl; if (!ttl) - ttl = dst_metric(&rt_dst(rt), RTAX_HOPLIMIT); + ttl = ip4_dst_hoplimit(&rt_dst(rt)); if (mutable->flags & TNL_F_TTL_INHERIT) { if (skb->protocol == htons(ETH_P_IP)) -- 2.43.0