From patchwork Wed Dec 12 05:11:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3.5.y.z, extended, stable] Patch "ipv6: Set default hoplimit as zero." has been added to staging queue X-Patchwork-Submitter: Herton Ronaldo Krzesinski X-Patchwork-Id: 205410 Message-Id: <1355289065-30953-1-git-send-email-herton.krzesinski@canonical.com> To: Li RongQing Cc: kernel-team@lists.ubuntu.com, "David S. Miller" Date: Wed, 12 Dec 2012 03:11:05 -0200 From: Herton Ronaldo Krzesinski List-Id: Kernel team discussions This is a note to let you know that I have just added a patch titled ipv6: Set default hoplimit as zero. to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree which can be found at: http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue If you, or anyone else, feels it should not be added to this tree, please reply to this email. For more information about the 3.5.y.z tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Herton ------ >From b5b94428996c620fb21909c96dc2cfe1c5f96f86 Mon Sep 17 00:00:00 2001 From: Li RongQing Date: Wed, 24 Oct 2012 14:01:18 +0800 Subject: [PATCH] ipv6: Set default hoplimit as zero. commit 14edd87dc67311556f1254a8f29cf4dd6cb5b7d1 upstream. 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 Signed-off-by: David S. Miller Signed-off-by: Herton Ronaldo Krzesinski --- net/ipv6/route.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.7.9.5 diff --git a/net/ipv6/route.c b/net/ipv6/route.c index a3ef2ad..fd44184 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -205,7 +205,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 struct rt6_info ip6_null_entry_template = { @@ -1135,7 +1135,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;