Skip to content

Commit

Permalink
ipv6: Set default hoplimit as zero.
Browse files Browse the repository at this point in the history
Commit a02e4b7(Demark default hoplimit as zero) only changes the
hoplimit checking condition and default value in ip6_dst_hoplimit, not
zeros all hoplimit default value.

Keep the zeroing ip6_template_metrics[RTAX_HOPLIMIT - 1] to force it as
const, cause as a37e6e3(net: force dst_default_metrics to const
section)

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Li RongQing authored and David S. Miller committed Oct 25, 2012
1 parent b2b3392 commit 14edd87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static struct dst_ops ip6_dst_blackhole_ops = {
};

static const u32 ip6_template_metrics[RTAX_MAX] = {
[RTAX_HOPLIMIT - 1] = 255,
[RTAX_HOPLIMIT - 1] = 0,
};

static const struct rt6_info ip6_null_entry_template = {
Expand Down Expand Up @@ -1232,7 +1232,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
rt->rt6i_dst.addr = fl6->daddr;
rt->rt6i_dst.plen = 128;
rt->rt6i_idev = idev;
dst_metric_set(&rt->dst, RTAX_HOPLIMIT, 255);
dst_metric_set(&rt->dst, RTAX_HOPLIMIT, 0);

spin_lock_bh(&icmp6_dst_lock);
rt->dst.next = icmp6_dst_gc_list;
Expand Down

0 comments on commit 14edd87

Please sign in to comment.