summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-05-04 04:30:19 +0000
committerJosh Blum <josh@joshknows.com>2010-05-04 04:30:19 +0000
commitd8c04c4b70f41b27acb33cd69ed88469d7c94482 (patch)
tree9da4f56489f11fb9c6451ff831e8f7b651e0874e /firmware
parent2e222f4a77df389551d08b42a1bf947487d1442f (diff)
parent3198ff91dcd3a06433654f9e50818f4566cbbe13 (diff)
downloaduhd-d8c04c4b70f41b27acb33cd69ed88469d7c94482.tar.gz
uhd-d8c04c4b70f41b27acb33cd69ed88469d7c94482.tar.bz2
uhd-d8c04c4b70f41b27acb33cd69ed88469d7c94482.zip
Merge branch 'master' of git@ettus.sourcerepo.com:ettus/uhdpriv into usrp_e
Diffstat (limited to 'firmware')
-rw-r--r--firmware/microblaze/lib/net_common.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/firmware/microblaze/lib/net_common.c b/firmware/microblaze/lib/net_common.c
index 67a3ff964..6c9509c92 100644
--- a/firmware/microblaze/lib/net_common.c
+++ b/firmware/microblaze/lib/net_common.c
@@ -303,7 +303,24 @@ handle_icmp_packet(struct ip_addr src, struct ip_addr dst,
}
break;
- case ICMP_ECHO:
+ case ICMP_ECHO:{
+ struct icmp_echo_hdr echo_reply;
+ echo_reply.type = 0;
+ echo_reply.code = 0;
+ echo_reply.chksum = 0;
+ echo_reply.id = icmp->id;
+ echo_reply.seqno = icmp->seqno;
+ echo_reply.chksum = ~chksum_buffer(
+ (unsigned short *)&echo_reply,
+ sizeof(echo_reply)/sizeof(short),
+ 0);
+ send_ip_pkt(
+ src, IP_PROTO_ICMP, &echo_reply, sizeof(echo_reply),
+ ((uint8_t*)icmp) + sizeof(struct icmp_echo_hdr),
+ len - sizeof(struct icmp_echo_hdr)
+ );
+ break;
+ }
default:
break;
}