Ver Fonte

support %i in loformat

z3APA3A há 9 anos atrás
pai
commit
84664a203b
2 ficheiros alterados com 5 adições e 0 exclusões
  1. 2 0
      man/3proxy.cfg.3
  2. 3 0
      src/common.c

+ 2 - 0
man/3proxy.cfg.3

@@ -300,6 +300,8 @@ with space and all time based elemnts are in local time zone.
   %R - Remote IP
 .br
   %r - Remote port
+.br
+  %i - Internal IP used to accept client connection
 .br
   %e - External IP used to establish connection
 .br

+ 3 - 0
src/common.c

@@ -502,6 +502,9 @@ int dobuf2(struct clientparam * param, unsigned char * buf, const unsigned char
 				case 'e':
 				 i += myinet_ntop(*SAFAMILY(&param->sinsl), SAADDR(&param->sinsl), (char *)buf + i, 64);
 				 break;
+				case 'i':
+				 i += myinet_ntop(*SAFAMILY(&param->sincl), SAADDR(&param->sinsl), (char *)buf + i, 64);
+				 break;
 				case 'C':
 				 i += myinet_ntop(*SAFAMILY(&param->sincr), SAADDR(&param->sincr), (char *)buf + i, 64);
 				 break;