Commit bcd32326 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

ipv6: Allow inet6_dump_addr() to handle more than 64 addresses

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: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 84d2697d
...@@ -3519,6 +3519,8 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, ...@@ -3519,6 +3519,8 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
cb->nlh->nlmsg_seq, cb->nlh->nlmsg_seq,
RTM_NEWADDR, RTM_NEWADDR,
NLM_F_MULTI); NLM_F_MULTI);
if (err <= 0)
break;
} }
break; break;
case MULTICAST_ADDR: case MULTICAST_ADDR:
...@@ -3532,6 +3534,8 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, ...@@ -3532,6 +3534,8 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
cb->nlh->nlmsg_seq, cb->nlh->nlmsg_seq,
RTM_GETMULTICAST, RTM_GETMULTICAST,
NLM_F_MULTI); NLM_F_MULTI);
if (err <= 0)
break;
} }
break; break;
case ANYCAST_ADDR: case ANYCAST_ADDR:
...@@ -3545,6 +3549,8 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, ...@@ -3545,6 +3549,8 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
cb->nlh->nlmsg_seq, cb->nlh->nlmsg_seq,
RTM_GETANYCAST, RTM_GETANYCAST,
NLM_F_MULTI); NLM_F_MULTI);
if (err <= 0)
break;
} }
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment