Fix crash IP2BIN and IP2STR due to ui128 type introduction.
PATCH 5/9 Fix crash IP2BIN and IP2STR due to ui128 type introduction.
IP2BIN and IP2STR were using the ptr field of the value but the type used for IPv6 address is now ui128. This patch fix this problem by using ui128 instead of ptr.
Signed-off-by Eric Leblond <[email protected]>
--- filter/ulogd_filter_IP2BIN.c | 2 +- filter/ulogd_filter_IP2STR.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
filter/ulogd_filter_IP2BIN.c +1 -1
@@ -137,7 +137,7 @@ static char *ip2bin(struct ulogd_key* inp, int index, char family)switch (family) {case AF_INET6 : - addr =GET_VALUE (inp, index).ptr; + addr =GET_VALUE (inp, index).ui128;break ;case AF_INET :/* Convert IPv4 to IPv4 in IPv6 */
filter/ulogd_filter_IP2STR.c +1 -1
@@ -174,7 +174,7 @@ static char *ip2str(struct ulogd_key *inp, int index)switch (convfamily) {case AF_INET6 :inet_ntop (AF_INET6 , -GET_VALUE (inp, index).ptr, +GET_VALUE (inp, index).ui128, tmp,sizeof (tmp));break ;case AF_INET :
Signature · 1 line
1.5.4.3
Pablo Neira Ayuso
maintainerQuoted 3 lines · Eric Leblond
IP2BIN and IP2STR were using the ptr field of the value but the type used for IPv6 address is now ui128. This patch fix this problem by using ui128 instead of ptr.
I have merged this to 02cleanup.patch. Thanks.
Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers