ALT Linux Bugzilla
– Attachment 611 Details for
Bug 5367
ipAdEntIfIndex и ifIndex имеют различные значения
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Патч исправляющий проблему.
net-snmp-5.1.1-ipAdEntIfIndex.patch (text/plain), 1.73 KB, created by
Markelov Alexander
on 2004-10-21 13:47:26 MSD
(
hide
)
Description:
Патч исправляющий проблему.
Filename:
MIME Type:
Creator:
Markelov Alexander
Created:
2004-10-21 13:47:26 MSD
Size:
1.73 KB
patch
obsolete
>--- net-snmp-5.1.1/agent/mibgroup/mibII/ipAddr.c.ipAdEntIfIndex 2004-04-08 17:38:48.368076685 +0200 >+++ net-snmp-5.1.1/agent/mibgroup/mibII/ipAddr.c 2004-04-08 17:48:52.977283961 +0200 >@@ -200,5 +200,8 @@ > #else > static struct ifnet lowin_ifnet; >+#if defined(linux) >+ static struct in_ifaddr in_ifaddr; >+#endif > #endif > static struct ifnet ifnet; > #endif /* hpux11 */ >@@ -211,14 +214,14 @@ > memcpy((char *) current, (char *) vp->name, > (int) vp->namelen * sizeof(oid)); > >-#if !defined(freebsd2) && !defined(hpux11) && !defined(linux) >+#if !defined(freebsd2) && !defined(hpux11) > Interface_Scan_Init(); > #else > Address_Scan_Init(); > #endif > for (;;) { > >-#if !defined(freebsd2) && !defined(hpux11) && !defined(linux) >+#if !defined(freebsd2) && !defined(hpux11) > if (Interface_Scan_Next(&interface, NULL, &ifnet, &in_ifaddr) == 0) > break; > #ifdef STRUCT_IFNET_HAS_IF_ADDRLIST >@@ -226,10 +229,7 @@ > continue; /* No address found for interface */ > #endif > #else /* !freebsd2 && !hpux11 */ >-#if defined(linux) >- if (Address_Scan_Next(&interface, &ifnet) == 0) >- break; >-#else >+#if !defined(linux) > if (Address_Scan_Next(&interface, &in_ifaddr) == 0) > break; > #endif >@@ -240,6 +240,9 @@ > #elif defined(linux) || defined(sunV3) > cp = (u_char *) & (((struct sockaddr_in *) &(ifnet.if_addr))-> > sin_addr.s_addr); >+ >+ if (*cp == 0) /* first octet is zero? 0.x.x.x is not a */ >+ continue; /* legal address for an interface */ > #else > cp = (u_char *) & (((struct sockaddr_in *) &(in_ifaddr.ia_addr))-> > sin_addr.s_addr);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 5367
: 611