version 1.278, 2017/09/03 23:33:13 |
version 1.279, 2017/09/21 19:16:53 |
|
|
char **cpptr, fwdarg[256]; |
char **cpptr, fwdarg[256]; |
u_int i, *uintptr, max_entries = 0; |
u_int i, *uintptr, max_entries = 0; |
int r, oactive, negated, opcode, *intptr, value, value2, cmdline = 0; |
int r, oactive, negated, opcode, *intptr, value, value2, cmdline = 0; |
|
int remotefwd, dynamicfwd; |
LogLevel *log_level_ptr; |
LogLevel *log_level_ptr; |
SyslogFacility *log_facility_ptr; |
SyslogFacility *log_facility_ptr; |
long long val64; |
long long val64; |
|
|
fatal("%.200s line %d: Missing port argument.", |
fatal("%.200s line %d: Missing port argument.", |
filename, linenum); |
filename, linenum); |
|
|
if (opcode == oLocalForward || |
remotefwd = (opcode == oRemoteForward); |
opcode == oRemoteForward) { |
dynamicfwd = (opcode == oDynamicForward); |
arg2 = strdelim(&s); |
|
if (arg2 == NULL || *arg2 == '\0') |
|
fatal("%.200s line %d: Missing target argument.", |
|
filename, linenum); |
|
|
|
/* construct a string for parse_forward */ |
if (!dynamicfwd) { |
snprintf(fwdarg, sizeof(fwdarg), "%s:%s", arg, arg2); |
arg2 = strdelim(&s); |
} else if (opcode == oDynamicForward) { |
if (arg2 == NULL || *arg2 == '\0') { |
strlcpy(fwdarg, arg, sizeof(fwdarg)); |
if (remotefwd) |
|
dynamicfwd = 1; |
|
else |
|
fatal("%.200s line %d: Missing target " |
|
"argument.", filename, linenum); |
|
} else { |
|
/* construct a string for parse_forward */ |
|
snprintf(fwdarg, sizeof(fwdarg), "%s:%s", arg, |
|
arg2); |
|
} |
} |
} |
|
if (dynamicfwd) |
|
strlcpy(fwdarg, arg, sizeof(fwdarg)); |
|
|
if (parse_forward(&fwd, fwdarg, |
if (parse_forward(&fwd, fwdarg, dynamicfwd, remotefwd) == 0) |
opcode == oDynamicForward ? 1 : 0, |
|
opcode == oRemoteForward ? 1 : 0) == 0) |
|
fatal("%.200s line %d: Bad forwarding specification.", |
fatal("%.200s line %d: Bad forwarding specification.", |
filename, linenum); |
filename, linenum); |
|
|
if (*activep) { |
if (*activep) { |
if (opcode == oLocalForward || |
if (remotefwd) { |
opcode == oDynamicForward) |
|
add_local_forward(options, &fwd); |
|
else if (opcode == oRemoteForward) |
|
add_remote_forward(options, &fwd); |
add_remote_forward(options, &fwd); |
|
} else { |
|
add_local_forward(options, &fwd); |
|
} |
} |
} |
break; |
break; |
|
|