MEDIUM: log-format: backend source address %Bi %Bp
%Bi return the backend source IP
%Bp return the backend source port
Add a function pointer in logformat_type to do additional configuration
during the log-format variable parsing.
diff --git a/src/backend.c b/src/backend.c
index 32eea68..39ee58b 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -985,6 +985,10 @@
assign_tproxy_address(s);
+ /* flag for logging source ip/port */
+ if (s->fe->options2 & PR_O2_SRC_ADDR)
+ s->req->cons->flags |= SI_FL_SRC_ADDR;
+
err = s->req->cons->connect(s->req->cons);
if (err != SN_ERR_NONE)