Simplify a bit ppp-linkup syntax
Fix awk syntax, it fixes #3813
Trigger rc.newwaipv6 as well from pppoe when it gets an inet6 config
Do not call rc.newwanip when pppoe gets a v6 ip.
Improve sh syntax using ${} for all variables
Use the better -Fs modifies to pf to kill the states by interface. Also kill both sides on an interface when -k needs to be used
pfctl -b is gone just use std tools of pfctl
Try a little harder to clear the states for the old PPP gateway
Use awk instead of grep, this works on a v4 PPPoE connection for me. Need to verify that it works for 3G too.Redmine ticket #2458
Update the link script to parse the arguments 6 and 7 differently.Previously mpd supplied the dns1 string as $6 and the IP as $7. It is now a single argument $6.Apparently this changed somewhere so parse the IP out of there into the correct nameserver file....
Make sure we don't accidentaly clobber the v4 dns servers with empty fields from v6
Make the ppp-linkup script understand both address families.
Rather use -c to check for line count, we then dont have to deal with extra whitespaces
Use the new change to be less distuptive
Reorder instructions and do not reload dns if its not allowed from the dns allow override setting.
Ticket #1408. Honor the allow override settings even for ppp devices.
Ticket #943. Sleep 1 second to give dns time to reload.
Ticket #876. Actually the event to send is interface newip $ip rather interface configure! also use the fact that now we have a /tmp/$if_defaultgw rather than relying in route get default which might block.
Reload dns and interface properly on dynamic types.
Ticket #876. Add the ip to the respective files on ppp linkup event so the code of dynamic gateways finds them. Also reorganize/simplify/optimize the apinger config generation code. Do not use that 127.0.0.x hack anymore and avoid loops as much as possible.
Use the new events mechanisms to dispatch events.
Delete previous route if present.
Don't need the rm -f statement when using > redirect to overwrite thefile, and add the "then" to the if statements
Be safer use the remote-ip address for adding route.
Explicitly set the exit status of the script to not make mpd fail.
Use full patch to command and fix route add command parameter is -iface and not -if.
Actually its dns2 for the second entry.
Resolve problems with dns server setup when allow override is set. Also add static routes for all nameservers to be friendly with multiwan.
Generate the {interface}up status file.
Fix issue reported on ticket #1825.
Actually apply fixes to the correct files.
Do not allow mpd to block
Recompile for FreeBSD 6
MFC 7196mpd blocks until ppp-linkup exits, background rc.newwanip as dyndns is tripping this up (it tries to connect out a pppoe connection that's blocking on this script).
Tested-by: DungaBee, Hoba, and a few others.
MFC 6871If WAN is pppoe, hold down boot until connection is established This will help anyone with PPPOE on WAN and DHCP on OPTx not get incorrect gateways assigned.
Remove ppp-linkup, readding as non binary file.
Initial revision