mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
Allow authname to be changed at any phase, just emit a warning
if it's not DEAD or ESTABLISH
This commit is contained in:
parent
daaf7aae15
commit
e9d0dd0a1b
1 changed files with 4 additions and 4 deletions
|
|
@ -1457,16 +1457,16 @@ SetVariable(struct cmdargs const *arg)
|
|||
|
||||
case VAR_AUTHNAME:
|
||||
switch (bundle_Phase(arg->bundle)) {
|
||||
default:
|
||||
log_Printf(LogWARN, "Altering authname while at phase %s\n",
|
||||
bundle_PhaseName(arg->bundle));
|
||||
/* drop through */
|
||||
case PHASE_DEAD:
|
||||
case PHASE_ESTABLISH:
|
||||
strncpy(arg->bundle->cfg.auth.name, argp,
|
||||
sizeof arg->bundle->cfg.auth.name - 1);
|
||||
arg->bundle->cfg.auth.name[sizeof arg->bundle->cfg.auth.name-1] = '\0';
|
||||
break;
|
||||
default:
|
||||
err = "set authname: Only available at phase DEAD/ESTABLISH\n";
|
||||
log_Printf(LogWARN, err);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue