lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #21107] LwIP doesn't reset the TTL in ICMP Echo Replie


From: Frédéric Bernon
Subject: [lwip-devel] [bug #21107] LwIP doesn't reset the TTL in ICMP Echo Replies
Date: Tue, 18 Sep 2007 09:09:27 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

Follow-up Comment #5, bug #21107 (project lwip):

>Is it? From reading the code, ICMP_TTL is passed to ip_output_if, but is not
used there, since it is only used if 'dest != IP_HDRINCL', and dest is
IP_HDRINCL in this case! In my opinion, the header must be completely filled
in icmp_input(), so the patch in buf #19580 in fact didn't fix the problem...
Or am I wrong? 

No, it's seems you're right. So, a patch like this is necessary?

    iphdr->src.addr = iphdr->dest.addr;
    iphdr->dest.addr = tmpaddr.addr;
+   IPH_TTL_SET(iphdr, ICMP_TTL);
    ICMPH_TYPE_SET(iecho, ICMP_ER);

>But the checksum can still be adjusted (which is much faster), instead of
being completely recalculated!

Yes, but in this case, the adjustment is more complex (icmp echo change, icmp
checksum, and ip ttl)?


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?21107>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]