diff options
| -rw-r--r-- | include/tinyrad.h | 1 | ||||
| -rw-r--r-- | lib/libtinyrad/lconf.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/tinyrad.h b/include/tinyrad.h index 80e9e3b..ce03bfc 100644 --- a/include/tinyrad.h +++ b/include/tinyrad.h | |||
| @@ -201,6 +201,7 @@ | |||
| 201 | #define TRAD_RADSEC (TRAD_RADIUS | TRAD_RADIUS_ACCT | TRAD_RADIUS_DYNAUTH | TRAD_TLS) | 201 | #define TRAD_RADSEC (TRAD_RADIUS | TRAD_RADIUS_ACCT | TRAD_RADIUS_DYNAUTH | TRAD_TLS) |
| 202 | #define TRAD_TCP 0x01000000U | 202 | #define TRAD_TCP 0x01000000U |
| 203 | #define TRAD_BUILTIN_DICT_LOADED 0x02000000U | 203 | #define TRAD_BUILTIN_DICT_LOADED 0x02000000U |
| 204 | #define TRAD_STOPINIT 0x04000000U | ||
| 204 | 205 | ||
| 205 | #define TRAD_OFF 0 | 206 | #define TRAD_OFF 0 |
| 206 | #define TRAD_ON 1 | 207 | #define TRAD_ON 1 |
diff --git a/lib/libtinyrad/lconf.c b/lib/libtinyrad/lconf.c index ad04db7..ef0c884 100644 --- a/lib/libtinyrad/lconf.c +++ b/lib/libtinyrad/lconf.c | |||
| @@ -308,6 +308,9 @@ tinyrad_conf_opt( | |||
| 308 | assert(name != NULL); | 308 | assert(name != NULL); |
| 309 | assert(value != NULL); | 309 | assert(value != NULL); |
| 310 | 310 | ||
| 311 | tr = ( ((tr)) && (!(tr->opts & TRAD_STOPINIT)) ) ? tr : NULL; | ||
| 312 | dict = ( ((dict)) && (!(dict->opts & TRAD_STOPINIT)) ) ? dict : NULL; | ||
| 313 | |||
| 311 | if (!(strcasecmp(name, "bind_address"))) | 314 | if (!(strcasecmp(name, "bind_address"))) |
| 312 | { | 315 | { |
| 313 | if ( (!(tr)) || ((tr->bind_sa)) || ((tr->bind_sa6)) || (!(value)) ) | 316 | if ( (!(tr)) || ((tr->bind_sa)) || ((tr->bind_sa6)) || (!(value)) ) |
| @@ -373,6 +376,12 @@ tinyrad_conf_opt( | |||
| 373 | return(tinyrad_set_option(tr, TRAD_OPT_SECRET, value)); | 376 | return(tinyrad_set_option(tr, TRAD_OPT_SECRET, value)); |
| 374 | }; | 377 | }; |
| 375 | 378 | ||
| 379 | if (!(strcasecmp(name, "stopinit"))) | ||
| 380 | { | ||
| 381 | tinyrad_conf_opt_bool(tr, dict, TRAD_STOPINIT, value); | ||
| 382 | return(TRAD_SUCCESS); | ||
| 383 | }; | ||
| 384 | |||
| 376 | if (!(strcasecmp(name, "timeout"))) | 385 | if (!(strcasecmp(name, "timeout"))) |
| 377 | { | 386 | { |
| 378 | if ( (!(tr)) || (tr->timeout != -1) || (!(value)) ) | 387 | if ( (!(tr)) || (tr->timeout != -1) || (!(value)) ) |
