|
|
|
@ -387,7 +387,8 @@ static void *ParseAFPConfig(const char *iface)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_PACKET_EBPF
|
|
|
|
|
if (ConfGetChildValueBoolWithDefault(if_root, if_default, "pinned-maps", (int *)&boolval) != 1) {
|
|
|
|
|
boolval = false;
|
|
|
|
|
if (ConfGetChildValueBoolWithDefault(if_root, if_default, "pinned-maps", (int *)&boolval) == 1) {
|
|
|
|
|
if (boolval) {
|
|
|
|
|
SCLogConfig("Using pinned maps on iface %s",
|
|
|
|
|
aconf->iface);
|
|
|
|
@ -514,10 +515,15 @@ static void *ParseAFPConfig(const char *iface)
|
|
|
|
|
int ret = EBPFLoadFile(aconf->iface, aconf->xdp_filter_file, "xdp",
|
|
|
|
|
&aconf->xdp_filter_fd,
|
|
|
|
|
&aconf->ebpf_t_config);
|
|
|
|
|
if (ret != 0) {
|
|
|
|
|
switch (ret) {
|
|
|
|
|
case 1:
|
|
|
|
|
SCLogInfo("Loaded pinned maps from sysfs");
|
|
|
|
|
break;
|
|
|
|
|
case -1:
|
|
|
|
|
SCLogWarning(SC_ERR_INVALID_VALUE,
|
|
|
|
|
"Error when loading XDP filter file");
|
|
|
|
|
} else {
|
|
|
|
|
break;
|
|
|
|
|
case 0:
|
|
|
|
|
ret = EBPFSetupXDP(aconf->iface, aconf->xdp_filter_fd, aconf->xdp_mode);
|
|
|
|
|
if (ret != 0) {
|
|
|
|
|
SCLogWarning(SC_ERR_INVALID_VALUE,
|
|
|
|
|