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: Add ipv6-pre-up-script option #511

Closed
wants to merge 1 commit into from

Conversation

tpaukrt
Copy link
Contributor

@tpaukrt tpaukrt commented Sep 1, 2024

This option allow a user to specify the path to a script that will be run before the interface is brought up, similarly to the existing ip-pre-up script.

This option allow a user to specify the path to a script
that will be run before the interface is brought up,
similarly to the existing ip-pre-up script.

Signed-off-by: Tomas Paukrt <[email protected]>
@paulusmack
Copy link
Collaborator

There have been similar proposals before, and a lot of discussion about whether this kind of thing is the right thing to do or not. See PR #341 and PR #367 for starters.

@jkroonza do you want to comment here?

@jkroonza
Copy link
Contributor

jkroonza commented Sep 9, 2024

net-pre-up in master.

commit 39063981f7605a994851eec4a7acae86b2327983 (origin/consolidated-ifup-down-and-scripts)
Author: Jaco Kroon <[email protected]>
Date:   Tue Sep 26 14:45:13 2023 +0200

    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]>

@tpaukrt tpaukrt closed this Sep 9, 2024
@tpaukrt tpaukrt deleted the ipv6-pre-up-script branch November 21, 2024 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants