summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDenys Fedoryshchenko <denys.f@collabora.com>2026-08-08 17:47:49 +0300
committerDenys Fedoryshchenko <denys.f@collabora.com>2026-08-08 17:47:49 +0300
commit6693d18ae0232da2c6febc0decf099e4fd064381 (patch)
treec8d9c3eb0e9084a053cd38d4d000a61c35722f04 /tests
parent4fb21bfd967ee834d2b5d5ea11d0838002d6ac1a (diff)
downloadaccel-ppp-6693d18ae0232da2c6febc0decf099e4fd064381.tar.gz
accel-ppp-6693d18ae0232da2c6febc0decf099e4fd064381.zip
ipoe: flush sessions left by a previous instance with a single command
On startup accel-pppd is expected to drop everything a previous instance left behind in the kernel. For sessions it did so by dumping them with IPOE_CMD_GET and sending one IPOE_CMD_DELETE per ifindex. That dump was written for the session backup code removed in 1972a7e5c and was never adapted to its new, destructive role: - it was issued on the socket subscribed to the packet multicast group, so it competed with the notifications that the still attached stale rx handlers keep generating; on a loaded box the receive buffer overruns and rtnl_dump_filter() gives up with ENOBUFS, - its return value was discarded, so such a failure was silent, - it ran before the interfaces were detached, which is what produces those notifications in the first place, - it was skipped entirely when the multicast group could not be resolved, again with nothing but a warning about packet handling, - and every session cost a socket, a round trip, a grace period and a full unregister_netdev(). Whatever it missed stays in the kernel forever: the daemon has no record of those sessions, so nothing ever deletes them, and every subscriber later assigned one of their addresses is refused with EEXIST by IPOE_CMD_MODIFY. Add IPOE_CMD_FLUSH, which unlinks all sessions in one go, waits for a single grace period and unregisters the devices with unregister_netdevice_many(), and use it instead. The old path is kept as a fallback for a module predating the command, which is reported as EOPNOTSUPP, and now checks its return value and uses a private socket. Reorder init() so the interfaces are detached before the multicast group is joined, and so the flush also runs when only the group lookup failed.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions