diff --git a/ChangeLog b/ChangeLog index 67fecc90..68d2342d 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 c67a631c..8baaabd8 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 2f33c063..4833b36d 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))