diff options
| author | Denys Fedoryshchenko <denys.f@collabora.com> | 2026-08-08 17:46:44 +0300 |
|---|---|---|
| committer | Denys Fedoryshchenko <denys.f@collabora.com> | 2026-08-08 17:46:44 +0300 |
| commit | 4fb21bfd967ee834d2b5d5ea11d0838002d6ac1a (patch) | |
| tree | db60d8f6971ad75e12d07f18a9127314ee98abb1 | |
| parent | b2eab395bb283b412e7bc8fef022ac06721b9a4e (diff) | |
| download | accel-ppp-4fb21bfd967ee834d2b5d5ea11d0838002d6ac1a.tar.gz accel-ppp-4fb21bfd967ee834d2b5d5ea11d0838002d6ac1a.zip | |
ipoe: do not skip a session when a dump spans several messages
ipoe_nl_cmd_dump_sessions() increments idx before calling fill_info(),
so once fill_info() fails because the skb is full, idx already points
past the session that did not fit. cb->args[0] is set to that value and
the next round resumes one entry too far, dropping the session from the
dump entirely - one lost session per message boundary, roughly one in
every 90 at the current record size.
Step idx back before leaving the loop.
| -rw-r--r-- | drivers/ipoe/ipoe.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c index 3bf8fef7..73926994 100644 --- a/drivers/ipoe/ipoe.c +++ b/drivers/ipoe/ipoe.c @@ -1579,7 +1579,11 @@ static int ipoe_nl_cmd_dump_sessions(struct sk_buff *skb, struct netlink_callbac #else if (fill_info(skb, ses, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq) < 0) #endif + { + /* this one did not fit, resume from it next time */ + idx--; break; + } } up(&ipoe_wlock); |
