diff options
| author | Michael Brown | 2006-07-20 02:03:01 +0200 |
|---|---|---|
| committer | Michael Brown | 2006-07-20 02:03:01 +0200 |
| commit | 29b358dd3933ec148d6087120a3014300e46b0e9 (patch) | |
| tree | 74f673eaaf69d5f6a692df2894b6b79bc5526158 /src | |
| parent | Clarify hexiness of header length (diff) | |
| download | ipxe-29b358dd3933ec148d6087120a3014300e46b0e9.tar.gz ipxe-29b358dd3933ec148d6087120a3014300e46b0e9.tar.xz ipxe-29b358dd3933ec148d6087120a3014300e46b0e9.zip | |
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
.
Diffstat (limited to 'src')
| -rw-r--r-- | src/net/udp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/net/udp.c b/src/net/udp.c index d04c94bb6..77fb3b973 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; } } |
