HKEY_DATALEN remains defined after first inclusion
of ip_set_hash_gen.h, so it is incorrectly reused
for IPv6 code.
Undefine HKEY_DATALEN in ip_set_hash_gen.h at the end.
Also remove some useless defines of HKEY_DATALEN in
ip_set_hash_{ip{,mark,port},netiface}.c as ip_set_hash_gen.h
defines it correctly for such set types anyway.
Signed-off-by: Sergey Popovich <popovich_sergei@mail.ua>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
return 0;
}
#endif /* IP_SET_EMIT_CREATE */
+
+#undef HKEY_DATALEN
#undef MTYPE
#undef HOST_MASK
-#undef HKEY_DATALEN
#define MTYPE hash_ip6
#define HOST_MASK 128
#define MTYPE hash_ipmark4
#define HOST_MASK 32
-#define HKEY_DATALEN sizeof(struct hash_ipmark4_elem)
#include "ip_set_hash_gen.h"
static int
#undef MTYPE
#undef HOST_MASK
-#undef HKEY_DATALEN
#define MTYPE hash_ipmark6
#define HOST_MASK 128
-#define HKEY_DATALEN sizeof(struct hash_ipmark6_elem)
#define IP_SET_EMIT_CREATE
#include "ip_set_hash_gen.h"
#define MTYPE hash_ipport4
#define HOST_MASK 32
-#define HKEY_DATALEN sizeof(struct hash_ipport4_elem)
#include "ip_set_hash_gen.h"
static int
#undef MTYPE
#undef HOST_MASK
-#undef HKEY_DATALEN
#define MTYPE hash_ipport6
#define HOST_MASK 128
-#define HKEY_DATALEN sizeof(struct hash_ipport6_elem)
#define IP_SET_EMIT_CREATE
#include "ip_set_hash_gen.h"
#undef MTYPE
#undef HOST_MASK
-#undef HKEY_DATALEN
#define MTYPE hash_netiface6
#define HOST_MASK 128