diff options
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.c | 4 | ||||
-rw-r--r-- | accel-pppd/libnetlink/iputils.c | 4 | ||||
-rw-r--r-- | accel-pppd/libnetlink/iputils.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index bafde688..7f92501f 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -641,7 +641,7 @@ static void ipoe_ifcfg_del(struct ipoe_session *ses) { struct ipoe_serv *serv = ses->serv; - if (iproute_del(serv->ifindex, ses->yiaddr)) + if (iproute_del(serv->ifindex, ses->yiaddr, conf_proto)) log_ppp_warn("ipoe: failed to delete route from interface '%s'\n", serv->ifname); if (ses->serv->opt_ifcfg) { @@ -2140,7 +2140,7 @@ static void load_config(void) if (opt && atoi(opt) > 0) conf_proto = atoi(opt); else - conf_proto = 0; + conf_proto = 3; #ifdef RADIUS if (triton_module_loaded("radius")) diff --git a/accel-pppd/libnetlink/iputils.c b/accel-pppd/libnetlink/iputils.c index 0e80b89c..029d09a6 100644 --- a/accel-pppd/libnetlink/iputils.c +++ b/accel-pppd/libnetlink/iputils.c @@ -261,7 +261,7 @@ int __export iproute_add(int ifindex, in_addr_t src, in_addr_t dst, int proto) return 0; } -int __export iproute_del(int ifindex, in_addr_t dst) +int __export iproute_del(int ifindex, in_addr_t dst, int proto) { struct ipaddr_req { struct nlmsghdr n; @@ -283,7 +283,7 @@ int __export iproute_del(int ifindex, in_addr_t dst) req.i.rtm_family = AF_INET; req.i.rtm_table = RT_TABLE_MAIN; req.i.rtm_scope = RT_SCOPE_LINK; - req.i.rtm_protocol = RTPROT_BOOT; + req.i.rtm_protocol = proto; req.i.rtm_type = RTN_UNICAST; req.i.rtm_dst_len = 32; diff --git a/accel-pppd/libnetlink/iputils.h b/accel-pppd/libnetlink/iputils.h index 57790539..5baf7426 100644 --- a/accel-pppd/libnetlink/iputils.h +++ b/accel-pppd/libnetlink/iputils.h @@ -12,7 +12,7 @@ int ipaddr_add(int ifindex, in_addr_t addr, int mask); int ipaddr_del(int ifindex, in_addr_t addr); int iproute_add(int ifindex, in_addr_t src, in_addr_t dst, int proto); -int iproute_del(int ifindex, in_addr_t dst); +int iproute_del(int ifindex, in_addr_t dst, int proto); int iprule_add(uint32_t addr, int table); int iprule_del(uint32_t addr, int table); |