Skip to content
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

pppd: implement net-init, net-pre-up and net-down. #367

Merged

Commits on Oct 3, 2023

  1. pppd: implement net-init, net-pre-up and net-down.

    net-init executes as a blocking script directly after the unit number
    becomes available.  This can be used to initialise aspects related to
    the ppp connection that lives outside of the ppp connection.  It can
    also be used to clean up (in the author's extremely unlikely case) where
    a previous pppd crashed, and net-down didn't execute in order to clean
    up.
    
    net-pre-up executes as a blocking script after auth, prior to NCPs being
    negotiated.  Unlike ip-pre-up this is guaranteed to execute prior to the
    interface being brought up, and can be used in an NCP agnostic manner to
    pre-initialise aspects of the interface for which it still needs to be
    down (amongst others it's recommended that firewall changes happen
    here).
    
    net-down executes in a non-blocking manner just prior to pppd
    terminating and can be used to clean up actions from previous scripts.
    
    You will notice that I mention ip-pre-up doesn't gaurantee that the
    interface will still be down, this is because in a Linux world all
    protocols runs on the same interface, compared to solaris where I'm
    informed each protocol runs on it's own sub-interface, each of which has
    it's own operational state.  The man page for pppd has also been
    adjusted to indicate as much.
    
    Signed-off-by: Jaco Kroon <[email protected]>
    jkroonza committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    3906398 View commit details
    Browse the repository at this point in the history