lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #7142] Sanity check user-configurable values


From: Frédéric Bernon
Subject: [lwip-devel] [task #7142] Sanity check user-configurable values
Date: Wed, 05 Sep 2007 12:57:55 +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 #25, task #7142 (project lwip):

For ARP_TABLE_SIZE, it's not really references outside etharp.c (in fact,
this is the index used to access to the table which are limited to s8_t
range).

In etharp_init, there is also the same kind of assert (which could/should be
removed).

But there is also a dependency with IP_PCB_ADDRHINT which is defined in ip.h.
So, if both etharp.h and ip.h have the same limitation, centralized the
checking is perhaps better ? And if one day, etharp.h/.c and ip.h are changed
to use s16_t, at the first test with ARP_TABLE_SIZE>0x7f, the developer who do
the change will got the #error, so, it seems difficult to miss that.

Same for tcp.h: we already check this value in lwip_sanity_check (but like a
"Warning") :

  if (TCP_WND > (PBUF_POOL_SIZE*PBUF_POOL_BUFSIZE))
    LWIP_PLATFORM_DIAG(("lwip_sanity_check: WARNING: TCP_WND is larger than
space provided by PBUF_POOL_SIZE*PBUF_POOL_BUFSIZEn"));
  if (TCP_WND < TCP_MSS)
    LWIP_PLATFORM_DIAG(("lwip_sanity_check: WARNING: TCP_WND is smaller than
MSSn"));

Since there is already check on TCP_WND in this place, it could be better to
centralized?

So, Simon, for you, is it a objection, or just a remark?


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?7142>

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





reply via email to

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