Thread (3 messages) 3 messages, 3 authors, 2017-12-21

Re: [PATCH net] ipv6: Honor specified parameters in fibmatch lookup

flat view

From: David Ahern <hidden>
Date: 2017-12-21 02:54:49

On 12/20/17 3:28 AM, Ido Schimmel wrote:
quoted hunk ↗ jump to hunk
@@ -4327,6 +4321,15 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh,
 		goto errout;
 	}
 
+	if (fibmatch && rt->dst.from) {
+		struct rt6_info *ort = container_of(rt->dst.from,
+						    struct rt6_info, dst);
+
+		dst_hold(&ort->dst);
+		ip6_rt_put(rt);
+		rt = ort;
+	}
+
 	skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
 	if (!skb) {
 		ip6_rt_put(rt);

That's going to need a fixup on the net-next merge -- from was moved
from dst to rt6_info. Change wise it looks ok to me.

Acked-by: David Ahern <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help