[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20121103191617.GD32458@moon>
Date: Sat, 3 Nov 2012 23:16:17 +0400
From: Cyrill Gorcunov <gorcunov@...nvz.org>
To: Pavel Emelyanov <xemul@...allels.com>
Cc: NETDEV <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>,
Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [RFC] net: netlink -- Allow netlink_dump to return error code if
protocol handler is missed
On Sat, Nov 03, 2012 at 08:39:58PM +0400, Cyrill Gorcunov wrote:
> On Sat, Nov 03, 2012 at 08:17:50PM +0400, Pavel Emelyanov wrote:
> > > static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb)
> > > Index: linux-2.6.git/net/netlink/af_netlink.c
> > > ===================================================================
> > > --- linux-2.6.git.orig/net/netlink/af_netlink.c
> > > +++ linux-2.6.git/net/netlink/af_netlink.c
> > > @@ -1740,6 +1740,10 @@ static int netlink_dump(struct sock *sk)
> > > else
> > > __netlink_sendskb(sk, skb);
> > > return 0;
> > > + } else if (len < 0) {
> > > + err = len;
> > > + nlk->cb = NULL;
> > > + goto errout_skb;
> >
> > When family-level handler is absent and sock_diag returns error this error
> > gets propagated back to user without this fix. Why do we need it in case
> > we return error from protocol-level handler?
>
> Because as far as I can say the family-level handler already has such error
> returning code in __sock_diag_rcv_msg. Or you mean something else?
OK, it seems I got what you mean, cooking/testing new patch.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists