From: shemminger Date: Thu, 12 Jan 2006 18:31:36 +0000 (+0000) Subject: ndle DCCP in ipxfrm.c to allow using port numbers in the selector. X-Git-Tag: ss-060314~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27356a5e000effe0060940c767547dd95235795c;p=thirdparty%2Fiproute2.git ndle DCCP in ipxfrm.c to allow using port numbers in the selector. --- diff --git a/ChangeLog b/ChangeLog index 67fecc906..68d2342d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-01-12 Patrick McHardy + + * Handle DCCP in ipxfrm.c to allow using port numbers in the selector. + 2006-01-10 Masahide NAKAMURA * Add ip link ntable @@ -19,11 +23,11 @@ * Add corrupt feature to netem -2005-12-02 Stephen Hemminger * Backout ambigious ip command matches -2005-11-22 Stephen Hemminger * Handle ambigious ip command matches diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c index c67a631c9..8baaabd81 100644 --- a/ip/ipxfrm.c +++ b/ip/ipxfrm.c @@ -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)); diff --git a/ip/xfrm.h b/ip/xfrm.h index 2f33c063c..4833b36dd 100644 --- 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))