Skip to content

Commit

Permalink
ipv6: drop metadata dst in ip6_route_input
Browse files Browse the repository at this point in the history
The fix in commit 48fb6b5 is incomplete, as now ip6_route_input can be
called with non-NULL dst if it's a metadata dst and the reference is leaked.
Drop the reference.

Fixes: 48fb6b5 ("ipv6: fix crash over flow-based vxlan device")
Fixes: ee122c7 ("vxlan: Flow based tunneling")
CC: Wei-Chun Chao <weichunc@plumgrid.com>
CC: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Jiri Benc <jbenc@redhat.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Benc authored and David S. Miller committed Aug 20, 2015
1 parent 61adedf commit 06e9d04
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,7 @@ void ip6_route_input(struct sk_buff *skb)
.flowi6_proto = iph->nexthdr,
};

skb_dst_drop(skb);
skb_dst_set(skb, ip6_route_input_lookup(net, skb->dev, &fl6, flags));
}

Expand Down

0 comments on commit 06e9d04

Please sign in to comment.