}
}
- if (ConfGetChildValueBoolWithDefault(if_root, if_default, "use-mmap", (int *)&boolval) == 1) {
+ if (ConfGetChildValueBoolWithDefault(if_root, if_default, "use-mmap", &boolval) == 1) {
if (!boolval) {
SCLogWarning(
"%s: \"use-mmap\" option is obsolete: mmap is always enabled", aconf->iface);
}
}
- (void)ConfGetChildValueBoolWithDefault(if_root, if_default, "mmap-locked", (int *)&boolval);
+ (void)ConfGetChildValueBoolWithDefault(if_root, if_default, "mmap-locked", &boolval);
if (boolval) {
SCLogConfig("%s: enabling locked memory for mmap", aconf->iface);
aconf->flags |= AFP_MMAP_LOCKED;
}
- if (ConfGetChildValueBoolWithDefault(if_root, if_default, "tpacket-v3", (int *)&boolval) == 1) {
+ if (ConfGetChildValueBoolWithDefault(if_root, if_default, "tpacket-v3", &boolval) == 1) {
if (boolval) {
if (strcasecmp(RunmodeGetActive(), "workers") == 0) {
#ifdef HAVE_TPACKET_V3
}
}
- (void)ConfGetChildValueBoolWithDefault(
- if_root, if_default, "use-emergency-flush", (int *)&boolval);
+ (void)ConfGetChildValueBoolWithDefault(if_root, if_default, "use-emergency-flush", &boolval);
if (boolval) {
SCLogConfig("%s: using emergency ring flush", aconf->iface);
aconf->flags |= AFP_EMERGENCY_MODE;
#ifdef HAVE_PACKET_EBPF
boolval = false;
- if (ConfGetChildValueBoolWithDefault(if_root, if_default, "pinned-maps", (int *)&boolval) == 1) {
+ if (ConfGetChildValueBoolWithDefault(if_root, if_default, "pinned-maps", &boolval) == 1) {
if (boolval) {
SCLogConfig("%s: using pinned maps", aconf->iface);
aconf->ebpf_t_config.flags |= EBPF_PINNED_MAPS;
}
boolval = true;
- if (ConfGetChildValueBoolWithDefault(if_root, if_default, "use-percpu-hash", (int *)&boolval) == 1) {
+ if (ConfGetChildValueBoolWithDefault(if_root, if_default, "use-percpu-hash", &boolval) ==
+ 1) {
if (boolval == false) {
SCLogConfig("%s: not using percpu hash", aconf->iface);
aconf->ebpf_t_config.cpus_count = 1;
aconf->block_timeout = 10;
}
- (void)ConfGetChildValueBoolWithDefault(if_root, if_default, "disable-promisc", (int *)&boolval);
+ (void)ConfGetChildValueBoolWithDefault(if_root, if_default, "disable-promisc", &boolval);
if (boolval) {
SCLogConfig("%s: disabling promiscuous mode", aconf->iface);
aconf->promisc = 0;
ConfNode *af_xdp_node = NULL;
int conf_val = 0;
intmax_t conf_val_int = 0;
- bool boolval = false;
+ int boolval = 0;
if (iface == NULL) {
return NULL;
(void)SC_ATOMIC_ADD(aconf->ref, aconf->threads);
/* Promisc Mode */
- (void)ConfGetChildValueBoolWithDefault(if_root, if_default, "disable-promisc", (int *)&boolval);
+ (void)ConfGetChildValueBoolWithDefault(if_root, if_default, "disable-promisc", &boolval);
if (boolval) {
SCLogConfig("Disabling promiscuous mode on iface %s", aconf->iface);
aconf->promisc = 0;