Skip to content

Commit

Permalink
net/ipv6: Remove extra call to ip6_convert_metrics for multipath case
Browse files Browse the repository at this point in the history
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: d4ead6b ("net/ipv6: move metrics from dst to rt6_info")
Signed-off-by: David Ahern <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
dsahern authored and davem330 committed Sep 27, 2018
1 parent 3f32d0b commit 36f19d5
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -4321,11 +4321,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);

Expand Down

0 comments on commit 36f19d5

Please sign in to comment.