From: Jesse Gross Date: Fri, 18 Mar 2011 21:37:33 +0000 (-0700) Subject: datapath: Use ipv4_dst_hoplimit() instead of direct access. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29722bcc53774a763c583dfeec12af492a035008;p=openvswitch 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 --- diff --git a/datapath/tunnel.c b/datapath/tunnel.c index a7d49437..7863b7a3 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))