Skip to contentSkip to conversation

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

PATCH Applied Eric Dumazet 2 participants 2 messages Nov 9, 2009 – Nov 11, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 net/ipv6/addrconf.c |    6 ++++++
 1 files changed, 6 insertions(+)
net/ipv6/addrconf.c +6 -0
index 024bba3..1b072fe 100644
@@ -3519,6 +3519,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:
@@ -3532,6 +3534,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:
@@ -3545,6 +3549,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:
maintainer Applied
#1 lore raw

From: Eric Dumazet <[email protected]>
Date: Mon, 09 Nov 2009 18:40:17 +0100

Quoted 5 lines

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.

Applied to net-next-2.6