lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #21643] udp_send/raw_send don't fail if netif is down


From: Simon Goldschmidt
Subject: [lwip-devel] [bug #21643] udp_send/raw_send don't fail if netif is down
Date: Sun, 25 Nov 2007 12:49:30 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9

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

> Can post here your patch?

I'm not really sure what to check: netif->ip_addr != 0 or (netif->flags &
NETIF_FLAG_UP) != 0 but I always allow sending when the destination ip address
is BROADCAST.

I do this check right at the beginning of ip_output_if and return ERR_IF
(maybe ERR_RTE is better) if it's not allowed.

Oh, the code size growth is minimal (2 or 3 if-checks):

if (!((dest->addr == INADDR_NONE) ||
      (((netif->flags & NETIF_FLAG_UP) != 0)) && (netif->ip_addr.addr != 0)))
{
    return ERR_IF; /* or ERR_RTE */
}


    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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