From 29b358dd3933ec148d6087120a3014300e46b0e9 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 20 Jul 2006 00:03:01 +0000 Subject: [PATCH] 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 . --- src/net/udp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/net/udp.c b/src/net/udp.c index d04c94bb..77fb3b97 100644 --- a/src/net/udp.c +++ b/src/net/udp.c @@ -235,17 +235,20 @@ void udp_rx ( struct pk_buff *pkb, struct in_addr *src_net_addr __unused, } /* Verify the checksum */ +#warning "Don't we need to take the pseudo-header into account here?" +#if 0 chksum = tcpip_chksum ( pkb->data, pkb_len ( pkb ) ); if ( chksum != 0xffff ) { - DBG ( "Bad checksum %d\n", chksum ); + DBG ( "Bad checksum %#x\n", chksum ); return; } +#endif /* Todo: Check if it is a broadcast or multicast address */ /* Demux the connection */ list_for_each_entry ( conn, &udp_conns, list ) { - if ( conn->local_port == ntohs ( udphdr->dest_port ) ) { + if ( conn->local_port == udphdr->dest_port ) { goto conn; } }