Skip to contentSkip to conversation

net/ipv6: Remove extra call to ip6_convert_metrics for multipath case

PATCH In review [email protected] 2 participants 2 messages Sep 27, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 net/ipv6: Remove extra call to ip6_convert_metrics for multipath case

From: David Ahern <[email protected]>

The change to move metrics from the dst to rt6_info moved the call to ip6_convert_metrics from ip6_route_add to ip6_route_info_create. In doing so it makes the call in ip6_route_info_append redundant and actually leaks the metrics installed as part of the ip6_route_info_create. Remove the now unnecessary call.

Fixes d4ead6b34b67f ("net/ipv6: move metrics from dst to rt6_info")
---
 net/ipv6/route.c | 5 -----
 1 file changed, 5 deletions(-)
net/ipv6/route.c +0 -5
index d28f83e01593..570f158253b9 100644
@@ -4293,11 +4293,6 @@ static int ip6_route_info_append(struct net *net,
 	if (!nh)
 		return -ENOMEM;
 	nh->fib6_info = rt;
-	err = ip6_convert_metrics(net, rt, r_cfg);
-	if (err) {
-		kfree(nh);
-		return err;
-	}
 	memcpy(&nh->r_cfg, r_cfg, sizeof(*r_cfg));
 	list_add_tail(&nh->next, rt6_nh_list);
 
Signature · 1 line
2.11.0
maintainer
#1 lore raw

From: [email protected]
Date: Wed, 26 Sep 2018 17:35:14 -0700

Quoted 10 lines

From: David Ahern <[email protected]>

The change to move metrics from the dst to rt6_info moved the call to ip6_convert_metrics from ip6_route_add to ip6_route_info_create. In doing so it makes the call in ip6_route_info_append redundant and actually leaks the metrics installed as part of the ip6_route_info_create. Remove the now unnecessary call.

Fixes d4ead6b34b67f ("net/ipv6: move metrics from dst to rt6_info")

Applied and queued up for -stable, thanks David.