Handle DCCP in ipxfrm.c to allow using port numbers in the selector.

Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>

Index: ip/ipxfrm.c
===================================================================
RCS file: /repos/iproute2/ip/ipxfrm.c,v
retrieving revision 1.13
diff -u -r1.13 ipxfrm.c
--- ip/ipxfrm.c	22 Mar 2005 16:13:21 -0000	1.13
+++ ip/ipxfrm.c	8 Jan 2006 20:58:10 -0000
@@ -445,6 +445,7 @@
 	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 @@
 		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: ip/xfrm.h
===================================================================
RCS file: /repos/iproute2/ip/xfrm.h,v
retrieving revision 1.11
diff -u -r1.11 xfrm.h
--- ip/xfrm.h	7 Nov 2005 18:39:30 -0000	1.11
+++ ip/xfrm.h	8 Jan 2006 20:58:10 -0000
@@ -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))

Reply via email to