From: Michael Tremer Date: Fri, 3 Jun 2011 20:55:14 +0000 (+0000) Subject: Fixed some issues with pppoe dial-in. X-Git-Tag: 001~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c973348fafe16d07a930063fe91b65d27915c6f;p=network.git Fixed some issues with pppoe dial-in. No major stuff. Just some fixes for invalid input. --- diff --git a/functions.ppp b/functions.ppp index 00015aef..ca6c4e03 100644 --- a/functions.ppp +++ b/functions.ppp @@ -34,7 +34,8 @@ function ppp_common_ip_pre_up() { return ${EXIT_ERROR} fi - routing_db_from_ppp ${zone} + # XXX protocol hardcoded + routing_db_from_ppp ${zone} ipv4 # Request firewall reload event_firewall_reload @@ -51,8 +52,9 @@ function ppp_common_ip_up() { return ${EXIT_ERROR} fi - routing_db_set ${zone} active 1 - red_routing_update ${zone} + # XXX protocol is hardcoded + routing_db_set ${zone} ipv4 active 1 + routing_update ${zone} ipv4 # Emit interface-up event event_interface_up ${zone} diff --git a/functions.routing b/functions.routing index d9459267..9d59e6d1 100644 --- a/functions.routing +++ b/functions.routing @@ -149,6 +149,9 @@ function routing_db_from_ppp() { local zone=${1} local proto=${2} + assert isset zone + assert isset proto + # Save ppp configuration routing_db_set ${zone} ${proto} type "ppp" routing_db_set ${zone} ${proto} local-ip-address ${PPP_IPLOCAL} @@ -161,6 +164,7 @@ function routing_db_from_ppp() { function routing_update() { local zone=${1} + assert isset zone # Nothing to do for local zones. if zone_is_local ${zone}; then @@ -169,6 +173,7 @@ function routing_update() { local proto=${2} local table=${zone} + assert isset proto # Create routing table if not exists routing_table_create ${table} diff --git a/hooks/zones/pppoe b/hooks/zones/pppoe index 895e1edd..c3640811 100755 --- a/hooks/zones/pppoe +++ b/hooks/zones/pppoe @@ -176,6 +176,10 @@ EOF log DEBUG "pppd detached successfully" exit ${EXIT_OK} ;; + 19) + log ERROR "Authentication failed. Maybe user and/or secret is/are incorrect." + exit ${EXIT_ERROR} + ;; esac error_log "pppd exited with unknown exit code '${ret}'"