lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #54890] A problem with TCP_SNDLOWAT validation macro


From: Amnon Paz
Subject: [lwip-devel] [bug #54890] A problem with TCP_SNDLOWAT validation macro
Date: Wed, 24 Oct 2018 02:34:00 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0

URL:
  <https://savannah.nongnu.org/bugs/?54890>

                 Summary: A problem with TCP_SNDLOWAT validation macro
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: paza
            Submitted on: Wed 24 Oct 2018 06:33:59 AM UTC
                Category: TCP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head

    _______________________________________________________

Details:

On src/core/init.c, line 308:
#if TCP_SNDLOWAT >= (0xFFFF - (4 * TCP_MSS))

This implicitly constrains TCP_MSS to be smaller than 4096, unless negative
value in the right-hand side of the expression is valid.

I think that if TCP_MSS may exceed 4096, the expression should be:
#if (TCP_SNDLOWAT + (4 * TCP_MSS)) >= 0xFFFF
This way, there is no question regarding constraints on TCP_MSS.

But if TCP_MSS may not exceed this 4096, a compilation-time error should be
raised in case that it does, for obvious reasons.




    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54890>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

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