]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ndle DCCP in ipxfrm.c to allow using port numbers in the selector.
authorshemminger <shemminger>
Thu, 12 Jan 2006 18:31:36 +0000 (18:31 +0000)
committershemminger <shemminger>
Thu, 12 Jan 2006 18:31:36 +0000 (18:31 +0000)
ChangeLog
ip/ipxfrm.c
ip/xfrm.h

index 67fecc90665e3f52091bfd9de4373f7abfcc0465..68d2342d1c290e3911997b0b2c94e43908301603 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-01-12  Patrick McHardy <kaber@trash.net>
+
+       * Handle DCCP in ipxfrm.c to allow using port numbers in the selector.
+
 2006-01-10  Masahide NAKAMURA <nakam@linux-ipv6.org>
 
        * Add ip link ntable
 
        * Add corrupt feature to netem
 
-2005-12-02  Stephen Hemminger  <shemminger@osdl.org
+2005-12-02  Stephen Hemminger  <shemminger@osdl.org>
 
        * Backout ambigious ip command matches
 
-2005-11-22  Stephen Hemminger  <shemminger@osdl.org
+2005-11-22  Stephen Hemminger  <shemminger@osdl.org>
 
        * Handle ambigious ip command matches
 
index c67a631c909f6cc5b9e95d153483b0f8608de8f8..8baaabd816efbdd5853eaec57e63bfdde8e4049a 100644 (file)
@@ -445,6 +445,7 @@ void xfrm_selector_print(struct xfrm_selector *sel, __u16 family,
        case IPPROTO_TCP:
        case IPPROTO_UDP:
        case IPPROTO_SCTP:
+       case IPPROTO_DCCP:
        default: /* XXX */
                if (sel->sport_mask)
                        fprintf(fp, "sport %u ", ntohs(sel->sport));
@@ -999,6 +1000,7 @@ static int xfrm_selector_upspec_parse(struct xfrm_selector *sel,
                case IPPROTO_TCP:
                case IPPROTO_UDP:
                case IPPROTO_SCTP:
+               case IPPROTO_DCCP:
                        break;
                default:
                        fprintf(stderr, "\"sport\" and \"dport\" are invalid with proto=%s\n", strxf_proto(sel->proto));
index 2f33c063cfa05e768f919dff581df88a007846ee..4833b36dd96b398cca82c2b103e4e2789b30a09e 100644 (file)
--- a/ip/xfrm.h
+++ b/ip/xfrm.h
@@ -32,6 +32,9 @@
 #ifndef IPPROTO_SCTP
 # define IPPROTO_SCTP  132
 #endif
+#ifndef IPPPROTO_DCCP
+# define IPPROTO_DCCP  33
+#endif
 
 #define XFRMS_RTA(x)  ((struct rtattr*)(((char*)(x)) + NLMSG_ALIGN(sizeof(struct xfrm_usersa_info))))
 #define XFRMS_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct xfrm_usersa_info))