- icmph->checksum = ~NetCksum((uchar *)icmph,
- (len - IP_HDR_SIZE) >> 1);
- NetSendPacket((uchar *)et, eth_hdr_size + len);
+ icmph->checksum = compute_ip_checksum(icmph, len - IP_HDR_SIZE);
+
+ tx_packet = net_get_async_tx_pkt_buf();
+ memcpy(tx_packet, et, eth_hdr_size + len);
+ net_send_packet(tx_packet, eth_hdr_size + len);