diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2019-02-25 11:22:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-25 11:22:48 +0100 |
commit | 2d639c819bd35d799b3f32b669b47db287b07ff1 (patch) | |
tree | 4d92170d90129bbdf5086ba9063537e58006f694 /src/ptunnel.c | |
parent | f2ec58545c8b48a8a664d9839bc73129231839ee (diff) | |
parent | 70973ac736e8b669f121a4c96b510e451fd130fc (diff) |
Merge pull request #9 from Masaq-/extended-options
fix segmentation fault when network is unreachable
Diffstat (limited to 'src/ptunnel.c')
-rw-r--r-- | src/ptunnel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ptunnel.c b/src/ptunnel.c index 640df74..fad0944 100644 --- a/src/ptunnel.c +++ b/src/ptunnel.c @@ -668,7 +668,7 @@ void* pt_proxy(void *args) { cur->dst_ip, cur->dst_port, kProto_ack | cur->type_flag, &cur->dest_addr, cur->next_remote_seq, &cur->send_first_ack, &cur->ping_seq, cur->window_size); cur->xfer.icmp_ack_out++; - if (cur->send_ring[idx].pkt_len > sizeof(icmp_echo_packet_t) && cur->send_ring[idx].pkt->type == 8) { + if (cur->send_ring[idx].pkt_len > sizeof(icmp_echo_packet_t) && cur->send_ring[idx].pkt->type == kICMP_echo_request) { for (uint16_t e = 0; e < opts.empty_pings; e++) { cur->send_ring[idx].pkt->seq = htons(cur->ping_seq); cur->ping_seq++; |