[ovs-dev] [PATCH 2/2] datapath: Use ipv4_dst_hoplimit() instead of direct access.
Jesse Gross
jesse at nicira.com
Fri Mar 18 22:02:26 UTC 2011
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 <jesse at nicira.com>
---
datapath/tunnel.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/datapath/tunnel.c b/datapath/tunnel.c
index a7d4943..7863b7a 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))
--
1.7.1
More information about the dev
mailing list