After upgrading from 7.0.6 to 7.0.8, regular ppp packets are getting
dropped when ppp rules in decoder-events.rules were set as drop.
This was caused by commit
a8f35806 ("detect: fix decoder only events").
Previously these rules would not be alerted or dropped.
It turns out several PPP protocols in a switch statement were falling
into the PPP_UNSUP_PROTO case. This has always been the case, I assume
the intention was that they don't get further inspected for size and
other decode errors hence unsupported.
But really some of the protocols are fundamentally required for a PPP
connection to take place.
Change some types that we know should be allowed to pass this.
Ticket: 7651
return DecodeIPV6(tv, dtv, p, pkt + data_offset, (uint16_t)(len - data_offset));
+ case PPP_IPCP:
+ case PPP_IPV6CP:
+ case PPP_LCP:
+ case PPP_PAP:
+ case PPP_CHAP:
+ case PPP_CCP:
+ case PPP_LQM:
+ case PPP_CBCP:
+ case PPP_COMP_DGRAM:
+ /* Valid types to be in PPP but don't inspect validity. */
+ return TM_ECODE_OK;
+
case PPP_VJ_COMP:
case PPP_IPX:
case PPP_OSI:
case PPP_SNS:
case PPP_MPLS_UCAST:
case PPP_MPLS_MCAST:
- case PPP_IPCP:
case PPP_OSICP:
case PPP_NSCP:
case PPP_DECNETCP:
case PPP_IPXCP:
case PPP_STIICP:
case PPP_VINESCP:
- case PPP_IPV6CP:
case PPP_MPLSCP:
- case PPP_LCP:
- case PPP_PAP:
- case PPP_LQM:
- case PPP_CHAP:
- case PPP_CCP:
- case PPP_CBCP:
- case PPP_COMP_DGRAM:
ENGINE_SET_EVENT(p, PPP_UNSUP_PROTO);
return TM_ECODE_OK;
case PPP_SNS:
case PPP_MPLS_UCAST:
case PPP_MPLS_MCAST:
- case PPP_IPCP:
case PPP_OSICP:
case PPP_NSCP:
case PPP_DECNETCP:
case PPP_IPXCP:
case PPP_STIICP:
case PPP_VINESCP:
- case PPP_IPV6CP:
case PPP_MPLSCP:
+ ENGINE_SET_EVENT(p, PPP_UNSUP_PROTO);
+ break;
+
+ case PPP_IPCP:
+ case PPP_IPV6CP:
case PPP_LCP:
case PPP_PAP:
- case PPP_LQM:
case PPP_CHAP:
- ENGINE_SET_EVENT(p, PPP_UNSUP_PROTO);
+ case PPP_CCP:
+ case PPP_LQM:
+ case PPP_CBCP:
+ case PPP_COMP_DGRAM:
+ /* Valid types to be in PPP but don't inspect validity. */
break;
case PPP_VJ_UCOMP: