Acked: [PATCH 1/1] ipv6: Allow inet6_dump_addr() to handle more than 64 addresses

Seth Forshee seth.forshee at canonical.com
Fri Dec 16 22:15:02 UTC 2011


On Fri, Dec 16, 2011 at 01:37:04PM -0800, Brad Figg wrote:
> From: Eric Dumazet <eric.dumazet at gmail.com>
> 
> 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 <eric.dumazet at gmail.com>
> Signed-off-by: David S. Miller <davem at davemloft.net>
> Signed-off-by: Brad Figg <brad.figg at canonical.com>
> (cherry picked from commit bcd323262a94b14b84341982b90443a76a477861)

Acked-by: Seth Forshee <seth.forshee at canonical.com>

> ---
>  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:
> -- 
> 1.7.5.4
> 
> 
> -- 
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team




More information about the kernel-team mailing list