summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/pppoe/pppoe.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/ctrl/pppoe/pppoe.c')
-rw-r--r--accel-pppd/ctrl/pppoe/pppoe.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c
index 78cc64a0..76684285 100644
--- a/accel-pppd/ctrl/pppoe/pppoe.c
+++ b/accel-pppd/ctrl/pppoe/pppoe.c
@@ -106,7 +106,7 @@ enum {CSID_MAC, CSID_IFNAME, CSID_IFNAME_MAC};
static int conf_called_sid;
static int conf_cookie_timeout;
static const char *conf_vlan_name;
-static int conf_vlan_timeout;
+static int conf_vlan_timeout = 60;
static mempool_t conn_pool;
static mempool_t pado_pool;
@@ -1610,7 +1610,7 @@ void pppoe_server_free(struct pppoe_serv_t *serv)
if (serv->timer.tpd)
triton_timer_del(&serv->timer);
- if (serv->vlan_mon) {
+ if (serv->vlan_mon && conf_vlan_timeout) {
log_info2("pppoe: remove vlan %s\n", serv->ifname);
iplink_vlan_del(serv->ifindex);
vlan_mon_add_vid(serv->parent_ifindex, ETH_P_PPP_DISC, serv->vid);
@@ -2084,10 +2084,8 @@ static void load_config(void)
conf_vlan_name = "%I.%N";
opt = conf_get_opt("pppoe", "vlan-timeout");
- if (opt && atoi(opt) > 0)
+ if (opt && atoi(opt) >= 0)
conf_vlan_timeout = atoi(opt);
- else
- conf_vlan_timeout = 60;
load_vlan_mon(s);
}