[backfire] merge ppp, pppoe, pptp and 3g fixes
r21283, r21284, r21285, r21287, r21302, r21303, r21341,
r21361, r21379, r21383, r21386, r21387, r21388, r21389,
r21390, r21391, r21392, r21393, r21426, r21556, r21563
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21564 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-24 20:06:58 +03:00
|
|
|
stop_interface_pppoa() {
|
|
|
|
stop_interface_ppp "$1"
|
2006-07-30 06:09:09 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
setup_interface_pppoa() {
|
|
|
|
local iface="$1"
|
|
|
|
local config="$2"
|
[backfire] merge ppp, pppoe, pptp and 3g fixes
r21283, r21284, r21285, r21287, r21302, r21303, r21341,
r21361, r21379, r21383, r21386, r21387, r21388, r21389,
r21390, r21391, r21392, r21393, r21426, r21556, r21563
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21564 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-24 20:06:58 +03:00
|
|
|
|
|
|
|
local device
|
2006-07-30 06:09:09 +03:00
|
|
|
config_get device "$config" device
|
[backfire] merge ppp, pppoe, pptp and 3g fixes
r21283, r21284, r21285, r21287, r21302, r21303, r21341,
r21361, r21379, r21383, r21386, r21387, r21388, r21389,
r21390, r21391, r21392, r21393, r21426, r21556, r21563
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21564 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-24 20:06:58 +03:00
|
|
|
|
|
|
|
local vpi
|
2006-10-31 01:58:01 +02:00
|
|
|
config_get vpi "$config" vpi
|
[backfire] merge ppp, pppoe, pptp and 3g fixes
r21283, r21284, r21285, r21287, r21302, r21303, r21341,
r21361, r21379, r21383, r21386, r21387, r21388, r21389,
r21390, r21391, r21392, r21393, r21426, r21556, r21563
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21564 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-24 20:06:58 +03:00
|
|
|
|
|
|
|
local vci
|
2006-10-31 01:58:01 +02:00
|
|
|
config_get vci "$config" vci
|
2006-07-30 06:09:09 +03:00
|
|
|
|
|
|
|
for module in slhc ppp_generic pppoatm; do
|
|
|
|
/sbin/insmod $module 2>&- >&-
|
|
|
|
done
|
[backfire] merge ppp, pppoe, pptp and 3g fixes
r21283, r21284, r21285, r21287, r21302, r21303, r21341,
r21361, r21379, r21383, r21386, r21387, r21388, r21389,
r21390, r21391, r21392, r21393, r21426, r21556, r21563
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21564 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-24 20:06:58 +03:00
|
|
|
|
|
|
|
local encaps
|
2007-04-21 12:37:13 +03:00
|
|
|
config_get encaps "$config" encaps
|
[backfire] merge ppp, pppoe, pptp and 3g fixes
r21283, r21284, r21285, r21287, r21302, r21303, r21341,
r21361, r21379, r21383, r21386, r21387, r21388, r21389,
r21390, r21391, r21392, r21393, r21426, r21556, r21563
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21564 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-24 20:06:58 +03:00
|
|
|
|
2007-04-21 12:37:13 +03:00
|
|
|
case "$encaps" in
|
[backfire] merge ppp, pppoe, pptp and 3g fixes
r21283, r21284, r21285, r21287, r21302, r21303, r21341,
r21361, r21379, r21383, r21386, r21387, r21388, r21389,
r21390, r21391, r21392, r21393, r21426, r21556, r21563
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21564 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-24 20:06:58 +03:00
|
|
|
1|vc) encaps="vc-encaps" ;;
|
|
|
|
*) encaps="llc-encaps" ;;
|
2007-04-21 12:37:13 +03:00
|
|
|
esac
|
2006-07-30 06:09:09 +03:00
|
|
|
|
[backfire] merge ppp, pppoe, pptp and 3g fixes
r21283, r21284, r21285, r21287, r21302, r21303, r21341,
r21361, r21379, r21383, r21386, r21387, r21388, r21389,
r21390, r21391, r21392, r21393, r21426, r21556, r21563
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21564 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-24 20:06:58 +03:00
|
|
|
local mtu
|
2009-03-15 14:08:31 +02:00
|
|
|
config_get mtu "$config" mtu
|
2007-03-14 21:00:10 +02:00
|
|
|
mtu=${mtu:-1500}
|
[backfire] merge ppp, pppoe, pptp and 3g fixes
r21283, r21284, r21285, r21287, r21302, r21303, r21341,
r21361, r21379, r21383, r21386, r21387, r21388, r21389,
r21390, r21391, r21392, r21393, r21426, r21556, r21563
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21564 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-24 20:06:58 +03:00
|
|
|
|
2006-07-30 06:09:09 +03:00
|
|
|
start_pppd "$config" \
|
[backfire] merge ppp, pppoe, pptp and 3g fixes
r21283, r21284, r21285, r21287, r21302, r21303, r21341,
r21361, r21379, r21383, r21386, r21387, r21388, r21389,
r21390, r21391, r21392, r21393, r21426, r21556, r21563
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21564 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-24 20:06:58 +03:00
|
|
|
plugin pppoatm.so ${vpi:-8}.${vci:-35} ${encaps} \
|
2006-07-30 06:09:09 +03:00
|
|
|
mtu $mtu mru $mtu
|
|
|
|
}
|