* [PATCH] fix ACK processing after netlink_dump_start
@ 2007-10-23 14:40 Denis V. Lunev
2007-10-23 15:36 ` Joseph Fannin
2007-10-23 16:34 ` Thomas Graf
0 siblings, 2 replies; 4+ messages in thread
From: Denis V. Lunev @ 2007-10-23 14:40 UTC (permalink / raw)
To: dcbw, tgraf, jfannin, davem; +Cc: netdev, kuznet
Revert to original netlink behavior. Do not reply with ACK if the
netlink dump has bees successfully started.
libnl has been broken by the cd40b7d3983c708aabe3d3008ec64ffce56d33b0
The following command reproduce the problem:
/nl-route-get 192.168.1.1
Signed-off-by: Denis V. Lunev <den@openvz.org>
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 98e313e..44a8b41 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1565,7 +1565,10 @@ int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
netlink_dump(sk);
sock_put(sk);
- return 0;
+
+ /* We successfully started a dump, by returning -EINTR we
+ * signal not to send ACK even if it was requested */
+ return -EINTR;
}
void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err)
@@ -1619,17 +1622,21 @@ int netlink_rcv_skb(struct sk_buff *skb, int (*cb)(struct sk_buff *,
/* Only requests are handled by the kernel */
if (!(nlh->nlmsg_flags & NLM_F_REQUEST))
- goto skip;
+ goto ack;
/* Skip control messages */
if (nlh->nlmsg_type < NLMSG_MIN_TYPE)
- goto skip;
+ goto ack;
err = cb(skb, nlh);
-skip:
+ if (err == -EINTR)
+ goto skip;
+
+ack:
if (nlh->nlmsg_flags & NLM_F_ACK || err)
netlink_ack(skb, nlh, err);
+skip:
msglen = NLMSG_ALIGN(nlh->nlmsg_len);
if (msglen > skb->len)
msglen = skb->len;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fix ACK processing after netlink_dump_start
2007-10-23 14:40 [PATCH] fix ACK processing after netlink_dump_start Denis V. Lunev
@ 2007-10-23 15:36 ` Joseph Fannin
2007-10-23 16:34 ` Thomas Graf
1 sibling, 0 replies; 4+ messages in thread
From: Joseph Fannin @ 2007-10-23 15:36 UTC (permalink / raw)
To: Denis V. Lunev; +Cc: dcbw, tgraf, jfannin, davem, netdev, kuznet
On Tue, Oct 23, 2007 at 06:40:23PM +0400, Denis V. Lunev wrote:
> Revert to original netlink behavior. Do not reply with ACK if the
> netlink dump has bees successfully started.
>
> libnl has been broken by the cd40b7d3983c708aabe3d3008ec64ffce56d33b0
> The following command reproduce the problem:
> /nl-route-get 192.168.1.1
>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
Network Manager works correctly here with this patch applied against
Linus's current -git.
(Sorry for the lack of response before -- I think I forgot to ask to
be CC'd on replies, and found the discussion of this in archives
only this morning.)
--
Joseph Fannin
jfannin@gmail.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix ACK processing after netlink_dump_start
2007-10-23 14:40 [PATCH] fix ACK processing after netlink_dump_start Denis V. Lunev
2007-10-23 15:36 ` Joseph Fannin
@ 2007-10-23 16:34 ` Thomas Graf
2007-10-24 3:29 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Thomas Graf @ 2007-10-23 16:34 UTC (permalink / raw)
To: Denis V. Lunev; +Cc: dcbw, jfannin, davem, netdev, kuznet
* Denis V. Lunev <den@openvz.org> 2007-10-23 18:40
> Revert to original netlink behavior. Do not reply with ACK if the
> netlink dump has bees successfully started.
>
> libnl has been broken by the cd40b7d3983c708aabe3d3008ec64ffce56d33b0
> The following command reproduce the problem:
> /nl-route-get 192.168.1.1
>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
ACK. Thank you for taking care of this.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix ACK processing after netlink_dump_start
2007-10-23 16:34 ` Thomas Graf
@ 2007-10-24 3:29 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2007-10-24 3:29 UTC (permalink / raw)
To: tgraf; +Cc: den, dcbw, jfannin, netdev, kuznet
From: Thomas Graf <tgraf@suug.ch>
Date: Tue, 23 Oct 2007 18:34:28 +0200
> * Denis V. Lunev <den@openvz.org> 2007-10-23 18:40
> > Revert to original netlink behavior. Do not reply with ACK if the
> > netlink dump has bees successfully started.
> >
> > libnl has been broken by the cd40b7d3983c708aabe3d3008ec64ffce56d33b0
> > The following command reproduce the problem:
> > /nl-route-get 192.168.1.1
> >
> > Signed-off-by: Denis V. Lunev <den@openvz.org>
>
> ACK. Thank you for taking care of this.
Applied, thanks everyone!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-10-24 3:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-23 14:40 [PATCH] fix ACK processing after netlink_dump_start Denis V. Lunev
2007-10-23 15:36 ` Joseph Fannin
2007-10-23 16:34 ` Thomas Graf
2007-10-24 3:29 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).