-
Notifications
You must be signed in to change notification settings - Fork 110
ipoe: support loading interfaces dynamically #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
louis-6wind
wants to merge
10
commits into
accel-ppp:master
Choose a base branch
from
louis-6wind:dynamic-interfaces
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or 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
f318109 to
adaf500
Compare
ipoe_mc_read() has been inherited from iproute2 -> libnetlink.c -> rtnl_listen(). In rtnl_listen(), the pointer h is of type struct nlmsghdr, whereas in ipoe_mc_read(), h is of type struct triton_md_handler_t. There was a confusion during function import. Fix a length calculation. Fixes: 046642d ("ipoe: integrating accel-pppd and ipoe kernel module") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
rtnl_listen() must return an integer. Fixes: bdf5bd0 ("implemented advanced shaper") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Replace exit() by return in rtnl_listen() because we do not want to exit in case of error. Note that some errors might not be recovered. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Break the loop when finishing receiving messages. It prepares moving the code from ipoe_mc_read() to use rtnl_listen(). rtnl_listen() will be called again on the reception of a message. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Prepare the move of the parsing of ipoe netlink messages to rtnl_listen(). Cosmetic change only. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Move the parsing of ipoe netlink messages to rtnl_listen(). Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Netlink link messages reception in the next commits requires an bigger buffer. Extend buffers to 16K in rtnl_listen(). Link: https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=e557212edafa069eea27022c9331fd30b9fac067 Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Monitor interface creation and deletion. It will be useful to dynamically load new interfaces that were not present at accel-ppp startup. The code uses the same basis as ipoe_netlink.c. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Add the ipoe_find_opt() function to find interface configuration in in order to prepare the next commit. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
When a non existing interface is set in ipoe configuration section, accel-ppp does not deal with it even it is created afterwards. Dynamically load the interface when they appear. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
adaf500 to
6f09d25
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a non existing interface is set in ipoe configuration section,
accel-ppp does not deal with it even it is created afterwards.
Dynamically load the interface when they appear.