lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #53125] netif_find(const char *name) cannot return cor


From: luocheng
Subject: [lwip-devel] [bug #53125] netif_find(const char *name) cannot return correct netif
Date: Mon, 12 Feb 2018 03:33:10 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0

URL:
  <http://savannah.nongnu.org/bugs/?53125>

                 Summary: netif_find(const char *name) cannot return correct
netif
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: luoc
            Submitted on: Mon 12 Feb 2018 08:33:09 AM UTC
                Category: IPv4
                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: 2.0.2

    _______________________________________________________

Details:

1) Note the member of "char name[2];" in "struct netif", maybe there is a bug
in following code of  netif_find():
netif_find(const char *name)
{
...
  num = (u8_t)(name[2] - '0');
...
if (num == netif->num &&
...
}

2) Realizing the logic of checking netif->num in netif_find(), what's the rule
of setting netif->name in network driver before calling netif_add()




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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