There is a problem in the rc_main script that allows the rc_masq file to be running twice concurrently at boot time. This problem only effects PPPoE and PPtP connections and only at bootup. In reality it is just a timing issue, because the rc_main script starts the rc_masq and at the same time durring bootup the ppp connection is also be initialized, so the rc_masq file is also called with the newip mode. This cause a corruption in the mask table and therefor the network doesn't work. So here is the solution for this problem for PPPoE and PPtP ethernet routers.
Place this code near the top of rc_main
- Code: Select all
fn4() ?{ ps | sed -n '/\ ? ? ? ?rc_masq/P'; ?}
Place this code in the
newip() section of the rc_main just above the line that starts rc_masq
- Code: Select all
while [ "`fn4`" ]; do
? sleep 2
done
rc_masq $1
This code will delay the second running of the rc_masq so that it does not cause data corruption.
ADDED: For clarification the above "rc_masq $1" is just a reference poit as to where the lines above it should be added and it is not intended to be entered twice.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.