* [PATCH] ipv6: Set default hoplimit as zero.
@ 2012-10-24 6:01 roy.qing.li
2012-10-25 3:15 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: roy.qing.li @ 2012-10-24 6:01 UTC (permalink / raw)
To: netdev
From: Li RongQing <roy.qing.li@gmail.com>
Commit a02e4b7dae4551(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 a37e6e344910(net: force dst_default_metrics to const
section)
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
---
net/ipv6/route.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index d1ddbc6..ba3c16e 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -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 = {
@@ -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;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ipv6: Set default hoplimit as zero.
2012-10-24 6:01 [PATCH] ipv6: Set default hoplimit as zero roy.qing.li
@ 2012-10-25 3:15 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-10-25 3:15 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev
From: roy.qing.li@gmail.com
Date: Wed, 24 Oct 2012 14:01:18 +0800
> From: Li RongQing <roy.qing.li@gmail.com>
>
> Commit a02e4b7dae4551(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 a37e6e344910(net: force dst_default_metrics to const
> section)
>
> Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
This bug has existed in various forms, thanks for fixing these
cases too. (f.e. see e965c05dabdabb85af0187952ccd75e43995c4b3)
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-25 3:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-24 6:01 [PATCH] ipv6: Set default hoplimit as zero roy.qing.li
2012-10-25 3:15 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).