return ${EXIT_ERROR}
fi
- routing_db_from_ppp ${zone}
+ # XXX protocol hardcoded
+ routing_db_from_ppp ${zone} ipv4
# Request firewall reload
event_firewall_reload
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}
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}
function routing_update() {
local zone=${1}
+ assert isset zone
# Nothing to do for local zones.
if zone_is_local ${zone}; then
local proto=${2}
local table=${zone}
+ assert isset proto
# Create routing table if not exists
routing_table_create ${table}
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}'"