Browse Source

conn->local_port is now network-endian; do not swap when comparing

against value in header.

Temporarily disable RX checksumming; it's broken and is holding up
work on higher-layer protocols
.
tags/v0.9.3
Michael Brown 18 years ago
parent
commit
29b358dd39
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      src/net/udp.c

+ 5
- 2
src/net/udp.c View File

@@ -235,17 +235,20 @@ void udp_rx ( struct pk_buff *pkb, struct in_addr *src_net_addr __unused,
235 235
 	}
236 236
 
237 237
 	/* Verify the checksum */
238
+#warning "Don't we need to take the pseudo-header into account here?"
239
+#if 0
238 240
 	chksum = tcpip_chksum ( pkb->data, pkb_len ( pkb ) );
239 241
 	if ( chksum != 0xffff ) {
240
-		DBG ( "Bad checksum %d\n", chksum );
242
+		DBG ( "Bad checksum %#x\n", chksum );
241 243
 		return;
242 244
 	}
245
+#endif
243 246
 
244 247
 	/* Todo: Check if it is a broadcast or multicast address */
245 248
 
246 249
 	/* Demux the connection */
247 250
 	list_for_each_entry ( conn, &udp_conns, list ) {
248
-		if ( conn->local_port == ntohs ( udphdr->dest_port ) ) {
251
+		if ( conn->local_port == udphdr->dest_port ) {
249 252
 			goto conn;
250 253
 		}
251 254
 	}

Loading…
Cancel
Save