fix ACK processing after netlink_dump_start
Subsystems (2)
PATCH 1/1 fix ACK processing after netlink_dump_start
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
net/netlink/af_netlink.c +11 -4
@@ -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;
Quoted 8 lines · Denis V. Lunev
Revert to original netlink behavior. Do not reply with ACK if the netlink dump has bees successfully started.
libnl has been broken by the
cd40b7d3983c708aabe3d3008ec64ffce56d33b0The following command reproduce the problem:/nl-route-get 192.168.1.1Signed-off-by Denis V. Lunev <[email protected]>
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
[email protected]
* Denis V. Lunev <[email protected]> 2007-10-23 18:40
Quoted 8 lines
Revert to original netlink behavior. Do not reply with ACK if the netlink dump has bees successfully started.
libnl has been broken by the
cd40b7d3983c708aabe3d3008ec64ffce56d33b0The following command reproduce the problem:/nl-route-get 192.168.1.1Signed-off-by Denis V. Lunev <[email protected]>
ACK. Thank you for taking care of this.
From: Thomas Graf <[email protected]>
Date: Tue, 23 Oct 2007 18:34:28 +0200
Quoted 11 lines
* Denis V. Lunev <[email protected]> 2007-10-23 18:40
Quoted 8 lines
Revert to original netlink behavior. Do not reply with ACK if the netlink dump has bees successfully started.
libnl has been broken by the
cd40b7d3983c708aabe3d3008ec64ffce56d33b0The following command reproduce the problem:/nl-route-get 192.168.1.1Signed-off-by Denis V. Lunev <[email protected]>ACK. Thank you for taking care of this.
Applied, thanks everyone!