diff -uprN net/dccp/dccp_options.c work/net/dccp/dccp_options.c
--- net/dccp/dccp_options.c	2005-04-15 20:19:55.000000000 -0200
+++ net/dccp/dccp_options.c	2005-04-15 20:20:04.000000000 -0200
@@ -50,7 +50,65 @@ static inline void dccp_options_init(str
   */	
 static inline int dccp_check_option_size(char *opt, short len)
 {
-	return -1;
+	int	skip;
+
+	/* one byte options */
+	skip = 1;
+	if (*opt <= DCCPO_MAX_RESERVED)
+		goto done;
+
+	skip = -1;
+	if (len < 3)
+		/* if type is >= 32, we have at least 3 bytes */
+		goto done;
+
+	opt++;
+	/* checking the second byte, which indicates the option size in
+	 * variable-size options */
+	if (len < *opt)
+		goto done;
+
+	skip = *opt;
+
+	/* checking for enforced sizes */
+	switch(opt[1]) {
+	case DCCPO_NDP_COUNT:
+		if (*opt > 5)
+			skip = -1;
+		break;
+	case DCCPO_TIMESTAMP:
+		if (*opt != 6)
+			skip = -1;
+		break;
+	case DCCPO_TIMESTAMP_ECHO:
+		if (*opt != 6 && *opt != 8 && *opt != 10)
+			skip = -1;
+		break;
+	case DCCPO_ELAPSED_TIME:
+		if (*opt != 4 && *opt != 6)
+			skip = -1;
+		break;
+	case DCCPO_DATA_CHECKSUM:
+		if (*opt != 6)
+			skip = -1;
+		break;
+	case DCCPO_CHANGE_L:
+	case DCCPO_CHANGE_R:
+		/*
+		 * from section 6.1:
+		 * Change L and Change R options initiate feature
+		 * negotiation. The option to use depends on the relevant
+		 * feature's location: To start a negotiation for feature F/A,
+		 * DCCP A will send a Change L option; to start a negotiation
+		 * for F/B, it will send a Change R option. Change options are
+		 * retransmitted until some response is received. They contain
+		 * at least one Value, and thus have length at least 4.
+		 */
+		if (*opt < 4)
+			skip = -1;
+	}
+done:
+	return skip;
 }
 
 /**
