]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: fixup regression in RTM_GETADDR
authorArthur Gautier <baloo@gandi.net>
Mon, 31 Dec 2018 02:10:58 +0000 (02:10 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Jan 2019 20:47:06 +0000 (12:47 -0800)
commit0de40698ac1568cc6b47bb4848a4dcd5579e3f2d
treece97a9c897dba6c3ff7bdd93340cf4ba92b99064
parent9255483fc467536fb75b11a60d55d63d6f477744
netlink: fixup regression in RTM_GETADDR

This commit fixes a regression in AF_INET/RTM_GETADDR and
AF_INET6/RTM_GETADDR.

Before this commit, the kernel would stop dumping addresses once the first
skb was full and end the stream with NLMSG_DONE(-EMSGSIZE). The error
shouldn't be sent back to netlink_dump so the callback is kept alive. The
userspace is expected to call back with a new empty skb.

Changes from V1:
 - The error is not handled in netlink_dump anymore but rather in
   inet_dump_ifaddr and inet6_dump_addr directly as suggested by
   David Ahern.

Fixes: 0e8fc26fef4c ("net/ipv4: Put target net when address dump fails due to bad attributes")
Fixes: 2c17a811e1cc ("net/ipv6: Put target net when address dump fails due to bad attributes")
Cc: David Ahern <dsahern@gmail.com>
Cc: "David S . Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: Arthur Gautier <baloo@gandi.net>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/devinet.c
net/ipv6/addrconf.c