Print this page
dccp: options and features

@@ -151,10 +151,12 @@
         {IPPROTO_ENCAP, ETHERTYPE_IP,   IPV4_TYPE_HEADER_OFFSET},
         {IPPROTO_ESP, ETHERTYPE_IP,   IPV4_TYPE_HEADER_OFFSET},
         {IPPROTO_ESP, ETHERTYPE_IPV6, IPV6_TYPE_HEADER_OFFSET},
         {IPPROTO_AH, ETHERTYPE_IP,   IPV4_TYPE_HEADER_OFFSET},
         {IPPROTO_AH, ETHERTYPE_IPV6, IPV6_TYPE_HEADER_OFFSET},
+        {IPPROTO_DCCP, ETHERTYPE_IP,   IPV4_TYPE_HEADER_OFFSET},
+        {IPPROTO_DCCP, ETHERTYPE_IPV6, IPV6_TYPE_HEADER_OFFSET},
         {-1, 0, 0}      /* must be the final entry */
 };
 
 static transport_table_t ipnet_transport_mapping_table[] = {
         {IPPROTO_TCP, (DL_IPNETINFO_VERSION << 8 | AF_INET),

@@ -185,10 +187,14 @@
             IPV6_TYPE_HEADER_OFFSET},
         {IPPROTO_AH, (DL_IPNETINFO_VERSION << 8 | AF_INET),
             IPV4_TYPE_HEADER_OFFSET},
         {IPPROTO_AH, (DL_IPNETINFO_VERSION << 8 | AF_INET6),
             IPV6_TYPE_HEADER_OFFSET},
+        {IPPROTO_DCCP, (DL_IPNETINFO_VERSION << 8 | AF_INET),
+            IPV4_TYPE_HEADER_OFFSET},
+        {IPPROTO_DCCP, (DL_IPNETINFO_VERSION << 8 | AF_INET6),
+            IPV6_TYPE_HEADER_OFFSET},
         {-1, 0, 0}      /* must be the final entry */
 };
 
 static transport_table_t ib_transport_mapping_table[] = {
         {IPPROTO_TCP, ETHERTYPE_IP,   IPV4_TYPE_HEADER_OFFSET},

@@ -204,10 +210,12 @@
         {IPPROTO_ENCAP, ETHERTYPE_IP,   IPV4_TYPE_HEADER_OFFSET},
         {IPPROTO_ESP, ETHERTYPE_IP,   IPV4_TYPE_HEADER_OFFSET},
         {IPPROTO_ESP, ETHERTYPE_IPV6, IPV6_TYPE_HEADER_OFFSET},
         {IPPROTO_AH, ETHERTYPE_IP,   IPV4_TYPE_HEADER_OFFSET},
         {IPPROTO_AH, ETHERTYPE_IPV6, IPV6_TYPE_HEADER_OFFSET},
+        {IPPROTO_DCCP, ETHERTYPE_IP,   IPV4_TYPE_HEADER_OFFSET},
+        {IPPROTO_DCCP, ETHERTYPE_IPV6, IPV6_TYPE_HEADER_OFFSET},
         {-1, 0, 0}      /* must be the final entry */
 };
 
 typedef struct datalink {
         uint_t                  dl_type;

@@ -1326,10 +1334,17 @@
                         opstack++;
                         next();
                         break;
                 }
 
+                if (EQ("dccp")) {
+                        pf_check_transport_protocol(IPPROTO_DCCP);
+                        opstack++;
+                        next();
+                        break;
+                }
+
                 if (EQ("(")) {
                         inBrace++;
                         next();
                         pf_expression();
                         if (EQ(")")) {