af-packet: terminate on same interface & copyiface

If the interface and copy-iface are same for an af-packet IPS device
setting then fataly exit else it leads to a segfault in later stages.

Bug 5870
pull/9370/head
Shivani Bhardwaj 3 years ago committed by Shivani Bhardwaj
parent 3d73538a5b
commit d4dd53c95f

@ -290,6 +290,11 @@ static void *ParseAFPConfig(const char *iface)
if (out_iface != NULL) {
if (strlen(out_iface) > 0) {
aconf->out_iface = out_iface;
if (strcmp(iface, out_iface) == 0) {
FatalError(
"Invalid config: interface (%s) and copy-iface (%s) can't be the same",
iface, out_iface);
}
}
} else {
SCLogWarning("copy-iface corresponding to %s interface cannot be NULL", iface);

Loading…
Cancel
Save