mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-07 15:04:39 +08:00
Fix bug #50427: SNMP: ifIndex should use netif_get_index()
We have netif_get_index(netif) now
This commit is contained in:
parent
1741edf159
commit
d8135f9ae2
@ -655,21 +655,7 @@ snmp_oid_equal(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_le
|
|||||||
u8_t
|
u8_t
|
||||||
netif_to_num(const struct netif *netif)
|
netif_to_num(const struct netif *netif)
|
||||||
{
|
{
|
||||||
u8_t result = 0;
|
return netif_get_index(netif);
|
||||||
struct netif *netif_iterator = netif_list;
|
|
||||||
|
|
||||||
while (netif_iterator != NULL) {
|
|
||||||
result++;
|
|
||||||
|
|
||||||
if (netif_iterator == netif) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
netif_iterator = netif_iterator->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
LWIP_ASSERT("netif not found in netif_list", 0);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct snmp_mib*
|
static const struct snmp_mib*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user