-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a single raw socket for receiving PPTP datagrams.
Instead of creating a new raw socket for every new PPTP session, just multiplex all sessions over a single socket. I put this change together intending it as a solution to #11 but from my experiments it appeared that it did not solve the problem, since Linux appears to deliver raw packets to the receive queues of all raw sockets bound to a particular protocol. However, there are still a couple of advantages to this change. Firstly, it should be more efficient as packets only get received a single time. Secondly, it means that the GRE server is established on startup, meaning that any problems with eg. permission errors will be made apparent on startup, rather than becoming a hard-to-debug error when a user tries to connect.
- Loading branch information
Showing
2 changed files
with
129 additions
and
28 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