diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-09-03 14:57:36 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-09-03 14:57:36 +0000 |
commit | 32082a46190ea27f7e958fce73167b3a368d7666 (patch) | |
tree | bdd8a10255529f954ff577a4017c6a3d1b935566 /nuttx/net/uip/uip-udpsend.c | |
parent | 9f60d09c6faaac732a62a188228a88321aad7368 (diff) | |
download | px4-nuttx-32082a46190ea27f7e958fce73167b3a368d7666.tar.gz px4-nuttx-32082a46190ea27f7e958fce73167b3a368d7666.tar.bz2 px4-nuttx-32082a46190ea27f7e958fce73167b3a368d7666.zip |
Fix ICMP and UDP IP checksums
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@871 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/net/uip/uip-udpsend.c')
-rw-r--r-- | nuttx/net/uip/uip-udpsend.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nuttx/net/uip/uip-udpsend.c b/nuttx/net/uip/uip-udpsend.c index 563d31a81..79ab36856 100644 --- a/nuttx/net/uip/uip-udpsend.c +++ b/nuttx/net/uip/uip-udpsend.c @@ -134,14 +134,14 @@ void uip_udpsend(struct uip_driver_s *dev, struct uip_udp_conn *conn) UDPBUF->ttl = conn->ttl; UDPBUF->proto = UIP_PROTO_UDP; + uiphdr_ipaddr_copy(UDPBUF->srcipaddr, &dev->d_ipaddr); + uiphdr_ipaddr_copy(UDPBUF->destipaddr, &conn->ripaddr); + /* Calculate IP checksum. */ UDPBUF->ipchksum = 0; UDPBUF->ipchksum = ~(uip_ipchksum(dev)); - uiphdr_ipaddr_copy(UDPBUF->srcipaddr, &dev->d_ipaddr); - uiphdr_ipaddr_copy(UDPBUF->destipaddr, &conn->ripaddr); - #endif /* CONFIG_NET_IPv6 */ /* Initialize the UDP header */ |