lwIP - A Lightweight TCP/IP stack - Bugs: bug #53125, netif_find(const char *name)...
You are not allowed to post comments on this tracker with your current authentication level.
bug #53125: netif_find(const char *name) cannot return correct netif
Submitter: | luocheng <luoc> | ||
Submitted: | Mon 12 Feb 2018 08:33:09 AM UTC | ||
Category: | IPv4 | Severity: | 3 - Normal |
Item Group: | Faulty Behaviour | Status: | Invalid |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | 2.0.2 |
Mon 12 Feb 2018 09:24:51 AM UTC, comment #2: |
luocheng <luoc> |
Mon 12 Feb 2018 08:37:18 AM UTC, comment #1: Read the docs: you don't pass 'netif->name' to 'netif_find()'. If 'netif->name' is 'en', you pass 'en0' to get the first netif of all the 'en' netifs. |
Simon Goldschmidt <goldsimon> |
Mon 12 Feb 2018 08:33:09 AM UTC, original submission:
1) Note the member of "char name[2];" in "struct netif", maybe there is a bug in following code of netif_find():
|
luocheng <luoc> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 6 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2018-02-12 | goldsimon | Status | None | Invalid | |
Open/Closed | Open | Closed | |||
2018-02-12 | luoc | Carbon-Copy | - | Added -email is unavailable- | |
Carbon-Copy | - | Added -email is unavailable- | |||
Carbon-Copy | - | Added -email is unavailable- | |||
Carbon-Copy | - | Added -email is unavailable- |
Powered by Savane 3.13-02a9.
Corresponding source code
After calling netif_add() to register a new netif, netif->num is increased every time.
According your way, it doesn't return correct netif due to the following logic:
netif_find(const char *name)
{
...
if (num == netif->num &&
...
}