Historically, log-forward proxy used to preserve host field from input
message as much as possible, and if syslog host wasn't provided
(rfc5424 '-' or bad rfc3164 or rfc5424 message) then "localhost" or "-"
would be used as host when outputting message using rfc3164 or rfc5424.
We change that behavior (which corresponds to "keep" host option), so that
log-forward now uses "fill" strategy as default: if the host is provided
in input message, it is preserved. However if it is missing and IP address
from sender is available, we use it.
(ie: '-' as input rfc5424 message or non compliant rfc3164 or
rfc5424 message), we use the source IP address from the sender as
host field.
+ (This is the default)
keep If input message already contains a value for the host field,
we keep it.
If input message doesn't contain a value for the host field,
we set it to 'localhost' (rfc3164) or '-' (rfc5424).
- (This is the default)
append If input message already contains a value for the host field,
we append a comma followed by the IP address from the sender.
px->accept = frontend_accept;
px->default_target = &syslog_applet.obj_type;
px->id = strdup(args[1]);
- px->options3 |= PR_O3_LOGF_HOST_KEEP;
+ px->options3 |= PR_O3_LOGF_HOST_FILL;
}
else if (strcmp(args[0], "maxconn") == 0) { /* maxconn */
if (warnifnotcap(cfg_log_forward, PR_CAP_FE, file, linenum, args[0], " Maybe you want 'fullconn' instead ?"))