mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-06 22:44:38 +08:00
fixed compiling icmp.c (variable has to be declared at the beginning of a scope)
This commit is contained in:
parent
a6c3bb4c6d
commit
a81c7bf04b
@ -189,6 +189,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
|
||||
if(pbuf_header(p, hlen)) {
|
||||
LWIP_ASSERT("Can't move over header in packet", 0);
|
||||
} else {
|
||||
err_t ret;
|
||||
iphdr = (struct ip_hdr*)p->payload;
|
||||
ip4_addr_copy(iphdr->src, inp->ip_addr);
|
||||
ip4_addr_copy(iphdr->dest, *ip4_current_src_addr());
|
||||
@ -217,7 +218,6 @@ icmp_input(struct pbuf *p, struct netif *inp)
|
||||
/* increase number of echo replies attempted to send */
|
||||
snmp_inc_icmpoutechoreps();
|
||||
|
||||
err_t ret;
|
||||
/* send an ICMP packet, src addr is the dest addr of the current packet */
|
||||
ret = ip4_output_if(p, ip4_current_dest_addr(), IP_HDRINCL,
|
||||
ICMP_TTL, 0, IP_PROTO_ICMP, inp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user