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/ipv6cp: Add ipv6-pre-up script. #341

Closed
wants to merge 1 commit into from

Commits on Jun 1, 2022

  1. pppd/ipv6cp: Add ipv6-pre-up script.

    This is required because either ipcp or ipv6cp can come up first, or as
    the only protocol, and once IPv6 parameters has been established, there
    are actions that may need to be executed prior to bringing the interface
    up.
    
    Prior to this we can have an execution order like:
    
    pppd[26615]: Script /etc/ppp/ipv6-up started (pid 28183)
    pppd[26615]: Script /etc/ppp/ip-pre-up started (pid 28186)
    pppd[26615]: Script /etc/ppp/ip-pre-up finished (pid 28186), status = 0x0
    pppd[26615]: Script /etc/ppp/ip-up started (pid 28238)
    pppd[26615]: Script /etc/ppp/ipv6-up finished (pid 28183), status = 0x0
    pppd[26615]: Script /etc/ppp/ip-up finished (pid 28238), status = 0x0
    
    ip ad sh shows that during ip-pre-up the interface state was already up:
    
    ppp-ip-pre-up(ppp1)[28208]: 423: ppp1: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1480 qdisc pfifo_fast state UNKNOWN group default qlen 3
    ppp-ip-pre-up(ppp1)[28208]:     link/ppp
    ppp-ip-pre-up(ppp1)[28208]:     inet 10.1.0.0 peer 192.168.50.0/32 scope global ppp1
    ppp-ip-pre-up(ppp1)[28208]:        valid_lft forever preferred_lft forever
    ulsdns_monitor[28216]: 192.168.50.0 dev ppp1 proto kernel scope link src 10.1.0.0
    ppp-ip-pre-up(ppp1)[28208]:     inet6 fe80::b4a3:c896:22bc:151f peer fe80::6/128 scope link
    ppp-ip-pre-up(ppp1)[28208]:        valid_lft forever preferred_lft forever
    
    In order to make this work properly, a system admin would need to take
    the same action from ip-up and ipv6-up (probably in a locked manner) if
    and only if the interface oper status is down.
    
    As things stand one cannot depende on ip-up being executed whilst
    interface is still in down state, and as such, the scription in the man
    page is wrong too.
    
    Signed-off-by: Jaco Kroon <[email protected]>
    jkroonza committed Jun 1, 2022
    Configuration menu
    Copy the full SHA
    6d54a91 View commit details
    Browse the repository at this point in the history