Skip to content

Conversation

@louis-6wind
Copy link
Contributor

@louis-6wind louis-6wind commented Jun 26, 2023

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.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant