Linux Kernels

ipv4: Kill dst_copy_metrics() call from ipv4_blackhole_route().

This change “ipv4: Kill dst_copy_metrics() call from ipv4_blackhole_route().” (commit 2db2d67) in Linux kernel is authored by David S. Miller <davem [at] davemloft.net> on Tue Jul 10 07:03:43 2012 -0700.

Description of "ipv4: Kill dst_copy_metrics() call from ipv4_blackhole_route()."

The change “ipv4: Kill dst_copy_metrics() call from ipv4_blackhole_route().” introduces changes as follows.

ipv4: Kill dst_copy_metrics() call from ipv4_blackhole_route().

Blackhole routes have a COW metrics operation that returns NULL
always, therefore this dst_copy_metrics() call did absolutely
nothing.

Signed-off-by: David S. Miller <davem@davemloft.net>

Linux kernel releases containing commit 2db2d67

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "ipv4: Kill dst_copy_metrics() call from ipv4_blackhole_route()."

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 net/ipv4/route.c | 1 -
 1 file changed, 1 deletion(-)
 
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 1678b575165b..a967df54a423 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2668,7 +2668,6 @@ struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_or
 		new->__use = 1;
 		new->input = dst_discard;
 		new->output = dst_discard;
-		dst_copy_metrics(new, &ort->dst);
 
 		new->dev = ort->dst.dev;
 		if (new->dev)

The commit for this change in Linux stable tree is 2db2d67 (patch).

Last modified: 2020/01/11 09:36