lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #11400] ARP multi-packet-queue modifies TCP unsent/una


From: Simon Goldschmidt
Subject: [lwip-devel] [bug #11400] ARP multi-packet-queue modifies TCP unsent/unacked segment packet pbuf chain into packet queue
Date: Mon, 26 Mar 2007 17:08:26 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Follow-up Comment #34, bug #11400 (project lwip):

Ok, I've looked through the code a little.

If the first pbuf is of type REF, we can simply copy it, let the new copy
point to the second pbuf (if the second is also REF the same for that one).

Whether we can simply re-allocate the middle of a pbuf-chain is a question of
whether we want user-given chains to survive a call to lwip functions or not.

E.g. if udp_send() was called with a 2-pbuf-chain RAM->REF and we move the
REF to RAM, we change the first pbuf in the chain. If the user uses this pbuf
again (e.g. just trying to re-send it while changing the contents behind the
REF) it will lead to (in my view) unexpected behaviour, wouldn't it?

Another question (to me) is the way pbuf_ref() increases the ref-count: if I
have 2 pbufs and I chain the writing "a->next = b" and send them using
udp_send(), I simply may not call pbuf_free(b) later, is that correct?
I agree that is faster than updating the refcount of the whole chain (in
pbuf_ref()), but I think that should be pointed out more clearly!

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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