Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information