applayer: error if probes are null but port is not

If the default port is set via the Rust registration table but the probe
fns to server and to client are set to None, the port is never used.
Setting port in such a case is useless so error out.
pull/6383/head
Shivani Bhardwaj 4 years ago committed by Victor Julien
parent f4f6387a00
commit d166acbdab

@ -55,6 +55,7 @@ AppProto AppLayerRegisterProtocolDetection(const struct AppLayerParser *p, int e
AppLayerProtoDetectRegisterProtocol(alproto, p->name);
if (p->ProbeTS == NULL && p->ProbeTC == NULL) {
BUG_ON(p->default_port != NULL);
return alproto;
}

Loading…
Cancel
Save