Re: [PATCH] net: relax PKTINFO non local ipv6 udp xmit check
From: David Miller <davem@davemloft.net>
Date: 2011-08-28 21:13:00
From: David Miller <davem@davemloft.net>
Date: 2011-08-28 21:13:00
From: Maciej Żenczykowski <redacted> Date: Fri, 26 Aug 2011 14:56:28 -0700
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index f3caf1b..a896987 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c@@ -360,7 +360,7 @@ fl_create(struct net *net, struct in6_flowlabel_req *freq, char __user *optval, msg.msg_control = (void*)(fl->opt+1); memset(&flowi6, 0, sizeof(flowi6)); - err = datagram_send_ctl(net, &msg, &flowi6, fl->opt, &junk, + err = datagram_send_ctl(net, NULL, &msg, &flowi6, fl->opt, &junk, &junk, &junk); if (err) goto done;
There is a socket associated with this fl_create() request, please pass it into fl_create() from it's caller, and thus down into datagram_send_ctl(), instead of just passing NULL. Then, since a valid sk is always passed in, you can elide the NULL check on 'sk' down at the bottom of these code paths. Thanks.