-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* events: add listener created/closed support These events have been added to the upstream kernel a while ago, see commit f8c9dfbd875b ("mptcp: add pm listener events") in the kernel. To better explain why these events are useful, better to quote [1]: MPTCP for Linux, when not using the in-kernel PM, depends on the userspace PM to create extra listening sockets before announcing addresses and ports. Let's call these "PM listeners". With the existing MPTCP netlink events, a userspace PM can create PM listeners at startup time, or in response to an incoming connection. Creating sockets in response to connections is not optimal: ADD_ADDRs can't be sent until the sockets are created and listen()ed, and if all connections are closed then it may not be clear to the userspace PM daemon that PM listener sockets should be cleaned up. With the addition of MPTCP netlink events for listening socket close & create, PM listening sockets can be managed based on application activity. These new events are then now handled by mptcpd, and plugins can be notified via two new hooks: - listener_created(laddr, pm) - listener_closed(laddr, pm) Link: multipath-tcp/mptcp_net-next#313 [1] Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> * plugins: sspi: add hooks for listener events Just to serve as an example, similar to what is done for other events like ADD_ADDR, RM_ADDR, and MP_PRIO. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> * tests: lib: support new listener events Just the structure to be able to test the new hooks. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> * tests: plugins: add listener event support Adding new hooks, checking the laddr value -- similar to what is done when a new connection is created -- and incrementing the linked counter, like the other hooks. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> * tests: validating new listener hooks Tests 1 and 2 are imitating the server side: a new listening socket is created. Not in the other ones, imitating the client side. Also validate the null plugin. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> --------- Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
- Loading branch information
Showing
14 changed files
with
318 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.