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
(cherry picked from commit
d4dd53c95f5fe30a0b2a1e71ab185c06c71a1afe)
if (ConfGetChildValueWithDefault(if_root, if_default, "copy-iface", &out_iface) == 1) {
if (strlen(out_iface) > 0) {
aconf->out_iface = out_iface;
+ if (strcmp(iface, out_iface) == 0) {
+ FatalError(SC_ERR_FATAL,
+ "Invalid config: interface (%s) and copy-iface (%s) can't be the same",
+ iface, out_iface);
+ }
}
}