decode/erspan: Warn on ERSPAN Type I config

This commit checks whether pre-6.x settings for ERSPAN Type I are
present. ERSPAN Type I is no longer enabled/disabled through a
configuration setting -- it's always enabled.

When a setting exists to enable/disable ERSPAN Type I decoding, a
warning message is logged.

Enabling/disabling ERSPAN Type I decode has been deprecated in 6.x
pull/4882/head
Jeff Lucovsky 6 years ago committed by Victor Julien
parent 82da71bbc4
commit fa082d04dc

@ -43,6 +43,21 @@
* \brief Functions to decode ERSPAN Type I and II packets
*/
/*
* \brief ERSPAN Type I was configurable in 5.0.x but is no longer configurable.
*
* Issue a warning if a configuration setting is found.
*/
void DecodeERSPANConfig(void)
{
int enabled = 0;
if (ConfGetBool("decoder.erspan.typeI.enabled", &enabled) == 1) {
SCLogWarning(SC_WARN_ERSPAN_CONFIG,
"ERSPAN Type I is no longer configurable and it is always"
" enabled; ignoring configuration setting.");
}
}
/**
* \brief ERSPAN Type I
*/

@ -34,4 +34,5 @@ typedef struct ErspanHdr_ {
uint32_t padding;
} __attribute__((__packed__)) ErspanHdr;
void DecodeERSPANConfig(void);
#endif /* __DECODE_ERSPAN_H__ */

@ -733,6 +733,7 @@ void DecodeGlobalConfig(void)
{
DecodeTeredoConfig();
DecodeVXLANConfig();
DecodeERSPANConfig();
}
/**

Loading…
Cancel
Save