Add SCTP as a known upper layer protocol over v6.
We are not yet aware of the protocol internals but this way SCTP traffic over v6 will not be discarded. Reported by: Peter Lei via rrs Tested by: Peter Lei <peterlei cisco.com>
This commit is contained in:
parent
fb1856eabd
commit
89e7e7e32a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=164258
@ -82,6 +82,7 @@
|
||||
#include <netinet/tcpip.h>
|
||||
#include <netinet/udp.h>
|
||||
#include <netinet/udp_var.h>
|
||||
#include <netinet/sctp.h>
|
||||
|
||||
#include <netgraph/ng_ipfw.h>
|
||||
|
||||
@ -311,6 +312,7 @@ static int fw_deny_unknown_exthdrs = 1;
|
||||
*/
|
||||
#define L3HDR(T, ip) ((T *)((u_int32_t *)(ip) + (ip)->ip_hl))
|
||||
#define TCP(p) ((struct tcphdr *)(p))
|
||||
#define SCTP(p) ((struct sctphdr *)(p))
|
||||
#define UDP(p) ((struct udphdr *)(p))
|
||||
#define ICMP(p) ((struct icmphdr *)(p))
|
||||
#define ICMP6(p) ((struct icmp6_hdr *)(p))
|
||||
@ -2222,6 +2224,12 @@ do { \
|
||||
args->f_id.flags = TCP(ulp)->th_flags;
|
||||
break;
|
||||
|
||||
case IPPROTO_SCTP:
|
||||
PULLUP_TO(hlen, ulp, struct sctphdr);
|
||||
src_port = SCTP(ulp)->src_port;
|
||||
dst_port = SCTP(ulp)->dest_port;
|
||||
break;
|
||||
|
||||
case IPPROTO_UDP:
|
||||
PULLUP_TO(hlen, ulp, struct udphdr);
|
||||
dst_port = UDP(ulp)->uh_dport;
|
||||
|
Loading…
Reference in New Issue
Block a user