diff --git a/src/decode-icmpv4.h b/src/decode-icmpv4.h index 79eafd9f19..ae889ae983 100644 --- a/src/decode-icmpv4.h +++ b/src/decode-icmpv4.h @@ -26,6 +26,7 @@ #include "decode.h" #include "decode-tcp.h" +#include "decode-sctp.h" #include "decode-udp.h" #define ICMPV4_HEADER_LEN 8 diff --git a/src/decode-icmpv6.c b/src/decode-icmpv6.c index 04fbe7c5a5..fa1020be50 100644 --- a/src/decode-icmpv6.c +++ b/src/decode-icmpv6.c @@ -27,6 +27,7 @@ #include "decode-icmpv6.h" #include "decode.h" #include "decode-tcp.h" +#include "decode-sctp.h" #include "decode-udp.h" #include "decode-events.h" #include "util-unittest.h" diff --git a/src/decode-icmpv6.h b/src/decode-icmpv6.h index 86d85ca966..bcfd6d2828 100644 --- a/src/decode-icmpv6.h +++ b/src/decode-icmpv6.h @@ -25,6 +25,7 @@ #define __DECODE_ICMPV6_H__ #include "decode-tcp.h" +#include "decode-sctp.h" #include "decode-udp.h" #include "decode-ipv6.h" diff --git a/src/decode-ipv4.c b/src/decode-ipv4.c index dfc14322d5..67dfd13e38 100644 --- a/src/decode-ipv4.c +++ b/src/decode-ipv4.c @@ -556,6 +556,10 @@ void DecodeIPV4(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, uint8_t *pkt, DecodeICMPV4(tv, dtv, p, pkt + IPV4_GET_HLEN(p), IPV4_GET_IPLEN(p) - IPV4_GET_HLEN(p), pq); break; + case IPPROTO_SCTP: + DecodeSCTP(tv, dtv, p, pkt + IPV4_GET_HLEN(p), + IPV4_GET_IPLEN(p) - IPV4_GET_HLEN(p), pq); + break; case IPPROTO_IPV6: { if (pq != NULL) { diff --git a/src/decode-ipv6.c b/src/decode-ipv6.c index b3a57761ca..8579bc998d 100644 --- a/src/decode-ipv6.c +++ b/src/decode-ipv6.c @@ -73,6 +73,11 @@ DecodeIPV6ExtHdrs(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, uint8_t *pkt DecodeICMPV6(tv, dtv, p, pkt, plen, pq); SCReturn; + case IPPROTO_SCTP: + IPV6_SET_L4PROTO(p,nh); + DecodeSCTP(tv, dtv, p, pkt, plen, pq); + SCReturn; + case IPPROTO_ROUTING: hdrextlen = sizeof(IPV6RouteHdr); hdrextlen += (*(pkt+1) * 8); /* 8 octet units */ @@ -441,6 +446,8 @@ void DecodeIPV6(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, uint8_t *pkt, break; case IPPROTO_ICMPV6: return DecodeICMPV6(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p), pq); + case IPPROTO_SCTP: + return DecodeSCTP(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p), pq); case IPPROTO_FRAGMENT: case IPPROTO_HOPOPTS: case IPPROTO_ROUTING: diff --git a/src/decode.h b/src/decode.h index bde9426ad9..e12482dffd 100644 --- a/src/decode.h +++ b/src/decode.h @@ -45,6 +45,7 @@ #include "decode-icmpv6.h" #include "decode-tcp.h" #include "decode-udp.h" +#include "decode-sctp.h" #include "decode-raw.h" #include "decode-vlan.h" @@ -702,6 +703,7 @@ void DecodeICMPV4(ThreadVars *, DecodeThreadVars *, Packet *, uint8_t *, uint16_ void DecodeICMPV6(ThreadVars *, DecodeThreadVars *, Packet *, uint8_t *, uint16_t, PacketQueue *); void DecodeTCP(ThreadVars *, DecodeThreadVars *, Packet *, uint8_t *, uint16_t, PacketQueue *); void DecodeUDP(ThreadVars *, DecodeThreadVars *, Packet *, uint8_t *, uint16_t, PacketQueue *); +void DecodeSCTP(ThreadVars *, DecodeThreadVars *, Packet *, uint8_t *, uint16_t, PacketQueue *); void DecodeGRE(ThreadVars *, DecodeThreadVars *, Packet *, uint8_t *, uint16_t, PacketQueue *); void DecodeVLAN(ThreadVars *, DecodeThreadVars *, Packet *, uint8_t *, uint16_t, PacketQueue *); diff --git a/src/respond-reject-libnet11.c b/src/respond-reject-libnet11.c index 8f222e4a74..687e0643cb 100644 --- a/src/respond-reject-libnet11.c +++ b/src/respond-reject-libnet11.c @@ -37,6 +37,7 @@ #include "decode.h" #include "decode-ipv4.h" #include "decode-tcp.h" +#include "decode-sctp.h" #include "decode-udp.h" #include "packet-queue.h" #include "threads.h"