From patchwork Fri Dec 16 21:37:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Figg X-Patchwork-Id: 131910 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 7475C1007DD for ; Sat, 17 Dec 2011 08:37:21 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1RbfSs-0003M9-0f; Fri, 16 Dec 2011 21:37:14 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1RbfSq-0003Lx-W9 for kernel-team@lists.ubuntu.com; Fri, 16 Dec 2011 21:37:13 +0000 Received: from static-50-53-107-235.bvtn.or.frontiernet.net ([50.53.107.235] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1RbfSq-0005vb-Km for kernel-team@lists.ubuntu.com; Fri, 16 Dec 2011 21:37:12 +0000 From: Brad Figg To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] ipv6: Allow inet6_dump_addr() to handle more than 64 addresses Date: Fri, 16 Dec 2011 13:37:04 -0800 Message-Id: <1324071424-10815-2-git-send-email-brad.figg@canonical.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1324071424-10815-1-git-send-email-brad.figg@canonical.com> References: <1324071424-10815-1-git-send-email-brad.figg@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Eric Dumazet BugLink: http://bugs.launchpad.net/bugs/863394 Apparently, inet6_dump_addr() is not able to handle more than 64 ipv6 addresses per device. We must break from inner loops in case skb is full, or else cursor is put at the end of list. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Brad Figg (cherry picked from commit bcd323262a94b14b84341982b90443a76a477861) Acked-by: Seth Forshee --- net/ipv6/addrconf.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 8ac3d09..e23be1f 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -3523,6 +3523,8 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, cb->nlh->nlmsg_seq, RTM_NEWADDR, NLM_F_MULTI); + if (err <= 0) + break; } break; case MULTICAST_ADDR: @@ -3536,6 +3538,8 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, cb->nlh->nlmsg_seq, RTM_GETMULTICAST, NLM_F_MULTI); + if (err <= 0) + break; } break; case ANYCAST_ADDR: @@ -3549,6 +3553,8 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, cb->nlh->nlmsg_seq, RTM_GETANYCAST, NLM_F_MULTI); + if (err <= 0) + break; } break; default: