From e738b10e231116df788e7ebf15985b3a74388081 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 18 Dec 2019 20:21:01 +0100 Subject: [PATCH] host-os-info: add test to show mixed ipv4/ipv6 --- src/util-host-os-info.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/util-host-os-info.c b/src/util-host-os-info.c index b8f3fa2185..a9ede07755 100644 --- a/src/util-host-os-info.c +++ b/src/util-host-os-info.c @@ -1139,6 +1139,9 @@ static int SCHInfoTestValidIPV6Address08(void) SC_HINFO_IS_IPV6) == -1) { goto end; } + if (SCHInfoAddHostOSInfo("vista", "8.8.8.0/24", SC_HINFO_IS_IPV4) == -1) { + goto end; + } if (SCHInfoAddHostOSInfo("irix", "default", SC_HINFO_IS_IPV6) == -1) { goto end; } @@ -1229,7 +1232,10 @@ static int SCHInfoTestValidIPV6Address08(void) SCMapEnumNameToValue("irix", sc_hinfo_os_policy_map)) { goto end; } - + if (SCHInfoGetHostOSFlavour("8.8.8.8") != + SCMapEnumNameToValue("vista", sc_hinfo_os_policy_map)) { + goto end; + } result = 1; end: