diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2013-05-23 21:57:16 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2013-05-23 21:57:16 +0400 |
commit | cf27bf49df5243237acb15389fb5544f5a863685 (patch) | |
tree | f136393420aa859067ae0da1ad084a51f0ee93af /accel-pppd | |
parent | de677ffd0e12f966c6d871e1343ccd5c517ad44c (diff) | |
download | accel-ppp-cf27bf49df5243237acb15389fb5544f5a863685.tar.gz accel-ppp-cf27bf49df5243237acb15389fb5544f5a863685.zip |
cli: fixed 'restart' command (do soft restart, i.e. terminate sessions by default)
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/cli/std_cmd.c | 16 | ||||
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.c | 3 |
2 files changed, 8 insertions, 11 deletions
diff --git a/accel-pppd/cli/std_cmd.c b/accel-pppd/cli/std_cmd.c index 7a890d1a..38198a2f 100644 --- a/accel-pppd/cli/std_cmd.c +++ b/accel-pppd/cli/std_cmd.c @@ -343,13 +343,17 @@ static void reload_help(char * const *fields, int fields_cnt, void *client) static void __do_restart(void) { +#ifdef USE_BACKUP core_restart(0); +#else + core_restart(1); +#endif _exit(0); } static int restart_exec(const char *cmd, char * const *f, int f_cnt, void *cli) { - int hard; + int hard = 0; if (f_cnt == 2) { if (strcmp(f[1], "soft") == 0) @@ -365,16 +369,12 @@ static int restart_exec(const char *cmd, char * const *f, int f_cnt, void *cli) else return CLI_CMD_SYNTAX; -#ifndef USE_BACKUP - hard = 1; -#endif - if (hard) { - ap_shutdown_soft(__do_restart); - terminate_all_sessions(0); - } else { core_restart(1); _exit(0); + } else { + ap_shutdown_soft(__do_restart); + terminate_all_sessions(0); } return CLI_CMD_OK; diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index 65b526f0..7fcfa266 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -570,9 +570,6 @@ static void ipoe_ifcfg_del(struct ipoe_session *ses) log_ppp_warn("ipoe: failed to delete route from interface '%s'\n", serv->ifname); if (ses->serv->opt_ifcfg) { - if (iproute_del(serv->ifindex, ses->yiaddr)) - log_ppp_warn("ipoe: failed to delete route from interface '%s'\n", serv->ifname); - if (ses->serv->opt_shared) { ipoe_serv_del_addr(ses->serv, ses->siaddr); } else { |