diff --git a/net-mgmt/net-snmp-devel/files/patch-ipv6.c b/net-mgmt/net-snmp-devel/files/patch-ipv6.c index 81e4807403c6..348fe8b3cf86 100644 --- a/net-mgmt/net-snmp-devel/files/patch-ipv6.c +++ b/net-mgmt/net-snmp-devel/files/patch-ipv6.c @@ -1,6 +1,6 @@ --- agent/mibgroup/mibII/ipv6.c.orig Wed Jun 30 22:35:24 2004 -+++ agent/mibgroup/mibII/ipv6.c Mon Jul 5 18:31:11 2004 -@@ -8,10 +8,22 @@ ++++ agent/mibgroup/mibII/ipv6.c Wed Aug 11 20:45:32 2004 +@@ -8,10 +8,25 @@ #define _KERNEL 1 #define _I_DEFINED_KERNEL #endif @@ -14,6 +14,9 @@ +#endif +#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) +#define OS_FREEBSD_OR_DARWIN 1 ++#if !defined(INP_IPV6PROTO) ++#define INP_IPV6PROTO 0x04 ++#endif +#endif + #include @@ -24,7 +27,7 @@ # if HAVE_SYS_SOCKETVAR_H # include # endif -@@ -80,7 +92,7 @@ +@@ -80,7 +95,7 @@ # include #endif #include @@ -33,7 +36,7 @@ # if HAVE_NETINET_IN_PCB_H # include # endif -@@ -575,7 +587,7 @@ +@@ -575,7 +590,7 @@ memcpy(result, &tmp, sizeof(tmp)); return 0; } @@ -42,7 +45,7 @@ q = (caddr_t) TAILQ_NEXT(&tmp, if_link); #else # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -806,7 +818,7 @@ +@@ -806,7 +821,7 @@ if (if_getifnet(interface, &ifnet) < 0) break; @@ -51,7 +54,7 @@ ifa = (caddr_t) TAILQ_FIRST(&ifnet.if_addrhead); #else # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -827,7 +839,7 @@ +@@ -827,7 +842,7 @@ *var_len = sdl.sdl_alen; return (u_char *) (sdl.sdl_data + sdl.sdl_nlen); } @@ -60,7 +63,7 @@ ifa = (caddr_t) TAILQ_NEXT(&ifaddr, ifa_link); #else # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -1220,32 +1232,33 @@ +@@ -1220,32 +1235,33 @@ size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { @@ -103,7 +106,7 @@ if (!auto_nlist("udb6", (char *) &udb6, sizeof(udb6))) return NULL; p = (caddr_t) udb6.in6p_next; -@@ -1274,41 +1287,44 @@ +@@ -1274,41 +1290,44 @@ (int) vp->namelen * sizeof(oid)); DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); while ( @@ -161,7 +164,7 @@ else newname[j++] = 0; /*XXX*/ -@@ -1319,7 +1335,7 @@ +@@ -1319,7 +1338,7 @@ result = snmp_oid_compare(name, *length, newname, j); if (exact && (result == 0)) { @@ -170,7 +173,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1330,7 +1346,7 @@ +@@ -1330,7 +1349,7 @@ */ if ((savnameLen == 0) || (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { @@ -179,7 +182,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1338,15 +1354,15 @@ +@@ -1338,15 +1357,15 @@ } skip: @@ -200,7 +203,7 @@ free(sysctl_buf); #endif DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1354,7 +1370,7 @@ +@@ -1354,7 +1373,7 @@ return NULL; *length = savnameLen; memcpy((char *) name, (char *) savname, *length * sizeof(oid)); @@ -209,7 +212,7 @@ *write_method = 0; *var_len = sizeof(long); /* default to 'long' results */ -@@ -1367,14 +1383,14 @@ +@@ -1367,14 +1386,14 @@ switch (vp->magic) { case IPV6UDPLOCALADDRESS: *var_len = sizeof(struct in6_addr); @@ -228,7 +231,7 @@ else long_return = 0; /*XXX*/ return (u_char *) & long_return; -@@ -1392,24 +1408,24 @@ +@@ -1392,24 +1411,24 @@ size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { @@ -260,7 +263,7 @@ #endif if (!initialized) { -@@ -1431,11 +1447,11 @@ +@@ -1431,11 +1450,11 @@ DEBUGMSGOID(("mibII/ipv6", name, *length)); DEBUGMSG(("mibII/ipv6", " %d\n", exact)); @@ -274,7 +277,7 @@ if (!auto_nlist("tcb6", (char *) &tcb6, sizeof(tcb6))) return NULL; p = (caddr_t) tcb6.in6p_next; -@@ -1464,9 +1480,10 @@ +@@ -1464,9 +1483,10 @@ (int) vp->namelen * sizeof(oid)); DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); while ( @@ -287,7 +290,7 @@ p && (u_long) p != auto_nlist_value("tcb6") #else xig->xig_len > sizeof(struct xinpgen) -@@ -1474,41 +1491,43 @@ +@@ -1474,41 +1494,43 @@ ) { DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p)); @@ -346,7 +349,7 @@ else newname[j++] = 0; /*XXX*/ newname[j++] = tcp6statemap[tcp6cb.t_state]; -@@ -1519,13 +1538,13 @@ +@@ -1519,13 +1541,13 @@ DEBUGMSG(("mibII/ipv6", " %d\n", exact)); #if 1 /* this is very odd but sometimes happen, and cause infinite loop */ @@ -362,7 +365,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1536,7 +1555,7 @@ +@@ -1536,7 +1558,7 @@ */ if ((savnameLen == 0) || (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { @@ -371,7 +374,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1544,15 +1563,15 @@ +@@ -1544,15 +1566,15 @@ } skip: @@ -392,7 +395,7 @@ free(sysctl_buf); #endif DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1573,20 +1592,20 @@ +@@ -1573,20 +1595,20 @@ switch (vp->magic) { case IPV6TCPLOCALADDR: *var_len = sizeof(struct in6_addr); @@ -419,7 +422,7 @@ else long_return = 0; /*XXX*/ return (u_char *) & long_return; -@@ -1633,22 +1652,23 @@ +@@ -1633,22 +1655,23 @@ size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { @@ -450,7 +453,7 @@ #endif DEBUGMSGTL(("mibII/ipv6", "var_tcp6: ")); -@@ -1688,9 +1708,9 @@ +@@ -1688,9 +1711,9 @@ (int) vp->namelen * sizeof(oid)); DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); while ( @@ -462,7 +465,7 @@ p && (u_long) p != auto_nlist_value("tcb6") #else xig->xig_len > sizeof(struct xinpgen) -@@ -1698,41 +1718,43 @@ +@@ -1698,41 +1721,43 @@ ) { DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p)); @@ -522,7 +525,7 @@ else newname[j++] = 0; /*XXX*/ newname[j++] = mapTcpState((int)tcpcb.t_state); -@@ -1743,12 +1765,12 @@ +@@ -1743,12 +1768,12 @@ DEBUGMSG(("mibII/ipv6", " %d\n", exact)); #if 1 /* this is very odd but sometimes happen, and cause infinite loop */ @@ -537,7 +540,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1759,7 +1781,7 @@ +@@ -1759,7 +1784,7 @@ */ if ((savnameLen == 0) || (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { @@ -546,7 +549,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1767,15 +1789,15 @@ +@@ -1767,15 +1792,15 @@ } skip: @@ -567,7 +570,7 @@ free(sysctl_buf); #endif DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1783,7 +1805,7 @@ +@@ -1783,7 +1808,7 @@ return NULL; *length = savnameLen; memcpy((char *) name, (char *) savname, *length * sizeof(oid)); @@ -576,7 +579,7 @@ *write_method = 0; *var_len = sizeof(long); /* default to 'long' results */ -@@ -1796,20 +1818,20 @@ +@@ -1796,20 +1821,20 @@ switch (vp->magic) { case IPV6TCPLOCALADDR: *var_len = sizeof(struct in6_addr); diff --git a/net-mgmt/net-snmp/files/patch-ipv6.c b/net-mgmt/net-snmp/files/patch-ipv6.c index 81e4807403c6..348fe8b3cf86 100644 --- a/net-mgmt/net-snmp/files/patch-ipv6.c +++ b/net-mgmt/net-snmp/files/patch-ipv6.c @@ -1,6 +1,6 @@ --- agent/mibgroup/mibII/ipv6.c.orig Wed Jun 30 22:35:24 2004 -+++ agent/mibgroup/mibII/ipv6.c Mon Jul 5 18:31:11 2004 -@@ -8,10 +8,22 @@ ++++ agent/mibgroup/mibII/ipv6.c Wed Aug 11 20:45:32 2004 +@@ -8,10 +8,25 @@ #define _KERNEL 1 #define _I_DEFINED_KERNEL #endif @@ -14,6 +14,9 @@ +#endif +#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) +#define OS_FREEBSD_OR_DARWIN 1 ++#if !defined(INP_IPV6PROTO) ++#define INP_IPV6PROTO 0x04 ++#endif +#endif + #include @@ -24,7 +27,7 @@ # if HAVE_SYS_SOCKETVAR_H # include # endif -@@ -80,7 +92,7 @@ +@@ -80,7 +95,7 @@ # include #endif #include @@ -33,7 +36,7 @@ # if HAVE_NETINET_IN_PCB_H # include # endif -@@ -575,7 +587,7 @@ +@@ -575,7 +590,7 @@ memcpy(result, &tmp, sizeof(tmp)); return 0; } @@ -42,7 +45,7 @@ q = (caddr_t) TAILQ_NEXT(&tmp, if_link); #else # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -806,7 +818,7 @@ +@@ -806,7 +821,7 @@ if (if_getifnet(interface, &ifnet) < 0) break; @@ -51,7 +54,7 @@ ifa = (caddr_t) TAILQ_FIRST(&ifnet.if_addrhead); #else # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -827,7 +839,7 @@ +@@ -827,7 +842,7 @@ *var_len = sdl.sdl_alen; return (u_char *) (sdl.sdl_data + sdl.sdl_nlen); } @@ -60,7 +63,7 @@ ifa = (caddr_t) TAILQ_NEXT(&ifaddr, ifa_link); #else # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -1220,32 +1232,33 @@ +@@ -1220,32 +1235,33 @@ size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { @@ -103,7 +106,7 @@ if (!auto_nlist("udb6", (char *) &udb6, sizeof(udb6))) return NULL; p = (caddr_t) udb6.in6p_next; -@@ -1274,41 +1287,44 @@ +@@ -1274,41 +1290,44 @@ (int) vp->namelen * sizeof(oid)); DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); while ( @@ -161,7 +164,7 @@ else newname[j++] = 0; /*XXX*/ -@@ -1319,7 +1335,7 @@ +@@ -1319,7 +1338,7 @@ result = snmp_oid_compare(name, *length, newname, j); if (exact && (result == 0)) { @@ -170,7 +173,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1330,7 +1346,7 @@ +@@ -1330,7 +1349,7 @@ */ if ((savnameLen == 0) || (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { @@ -179,7 +182,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1338,15 +1354,15 @@ +@@ -1338,15 +1357,15 @@ } skip: @@ -200,7 +203,7 @@ free(sysctl_buf); #endif DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1354,7 +1370,7 @@ +@@ -1354,7 +1373,7 @@ return NULL; *length = savnameLen; memcpy((char *) name, (char *) savname, *length * sizeof(oid)); @@ -209,7 +212,7 @@ *write_method = 0; *var_len = sizeof(long); /* default to 'long' results */ -@@ -1367,14 +1383,14 @@ +@@ -1367,14 +1386,14 @@ switch (vp->magic) { case IPV6UDPLOCALADDRESS: *var_len = sizeof(struct in6_addr); @@ -228,7 +231,7 @@ else long_return = 0; /*XXX*/ return (u_char *) & long_return; -@@ -1392,24 +1408,24 @@ +@@ -1392,24 +1411,24 @@ size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { @@ -260,7 +263,7 @@ #endif if (!initialized) { -@@ -1431,11 +1447,11 @@ +@@ -1431,11 +1450,11 @@ DEBUGMSGOID(("mibII/ipv6", name, *length)); DEBUGMSG(("mibII/ipv6", " %d\n", exact)); @@ -274,7 +277,7 @@ if (!auto_nlist("tcb6", (char *) &tcb6, sizeof(tcb6))) return NULL; p = (caddr_t) tcb6.in6p_next; -@@ -1464,9 +1480,10 @@ +@@ -1464,9 +1483,10 @@ (int) vp->namelen * sizeof(oid)); DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); while ( @@ -287,7 +290,7 @@ p && (u_long) p != auto_nlist_value("tcb6") #else xig->xig_len > sizeof(struct xinpgen) -@@ -1474,41 +1491,43 @@ +@@ -1474,41 +1494,43 @@ ) { DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p)); @@ -346,7 +349,7 @@ else newname[j++] = 0; /*XXX*/ newname[j++] = tcp6statemap[tcp6cb.t_state]; -@@ -1519,13 +1538,13 @@ +@@ -1519,13 +1541,13 @@ DEBUGMSG(("mibII/ipv6", " %d\n", exact)); #if 1 /* this is very odd but sometimes happen, and cause infinite loop */ @@ -362,7 +365,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1536,7 +1555,7 @@ +@@ -1536,7 +1558,7 @@ */ if ((savnameLen == 0) || (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { @@ -371,7 +374,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1544,15 +1563,15 @@ +@@ -1544,15 +1566,15 @@ } skip: @@ -392,7 +395,7 @@ free(sysctl_buf); #endif DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1573,20 +1592,20 @@ +@@ -1573,20 +1595,20 @@ switch (vp->magic) { case IPV6TCPLOCALADDR: *var_len = sizeof(struct in6_addr); @@ -419,7 +422,7 @@ else long_return = 0; /*XXX*/ return (u_char *) & long_return; -@@ -1633,22 +1652,23 @@ +@@ -1633,22 +1655,23 @@ size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { @@ -450,7 +453,7 @@ #endif DEBUGMSGTL(("mibII/ipv6", "var_tcp6: ")); -@@ -1688,9 +1708,9 @@ +@@ -1688,9 +1711,9 @@ (int) vp->namelen * sizeof(oid)); DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); while ( @@ -462,7 +465,7 @@ p && (u_long) p != auto_nlist_value("tcb6") #else xig->xig_len > sizeof(struct xinpgen) -@@ -1698,41 +1718,43 @@ +@@ -1698,41 +1721,43 @@ ) { DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p)); @@ -522,7 +525,7 @@ else newname[j++] = 0; /*XXX*/ newname[j++] = mapTcpState((int)tcpcb.t_state); -@@ -1743,12 +1765,12 @@ +@@ -1743,12 +1768,12 @@ DEBUGMSG(("mibII/ipv6", " %d\n", exact)); #if 1 /* this is very odd but sometimes happen, and cause infinite loop */ @@ -537,7 +540,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1759,7 +1781,7 @@ +@@ -1759,7 +1784,7 @@ */ if ((savnameLen == 0) || (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { @@ -546,7 +549,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1767,15 +1789,15 @@ +@@ -1767,15 +1792,15 @@ } skip: @@ -567,7 +570,7 @@ free(sysctl_buf); #endif DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1783,7 +1805,7 @@ +@@ -1783,7 +1808,7 @@ return NULL; *length = savnameLen; memcpy((char *) name, (char *) savname, *length * sizeof(oid)); @@ -576,7 +579,7 @@ *write_method = 0; *var_len = sizeof(long); /* default to 'long' results */ -@@ -1796,20 +1818,20 @@ +@@ -1796,20 +1821,20 @@ switch (vp->magic) { case IPV6TCPLOCALADDR: *var_len = sizeof(struct in6_addr); diff --git a/net-mgmt/net-snmp53/files/patch-ipv6.c b/net-mgmt/net-snmp53/files/patch-ipv6.c index 81e4807403c6..348fe8b3cf86 100644 --- a/net-mgmt/net-snmp53/files/patch-ipv6.c +++ b/net-mgmt/net-snmp53/files/patch-ipv6.c @@ -1,6 +1,6 @@ --- agent/mibgroup/mibII/ipv6.c.orig Wed Jun 30 22:35:24 2004 -+++ agent/mibgroup/mibII/ipv6.c Mon Jul 5 18:31:11 2004 -@@ -8,10 +8,22 @@ ++++ agent/mibgroup/mibII/ipv6.c Wed Aug 11 20:45:32 2004 +@@ -8,10 +8,25 @@ #define _KERNEL 1 #define _I_DEFINED_KERNEL #endif @@ -14,6 +14,9 @@ +#endif +#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) +#define OS_FREEBSD_OR_DARWIN 1 ++#if !defined(INP_IPV6PROTO) ++#define INP_IPV6PROTO 0x04 ++#endif +#endif + #include @@ -24,7 +27,7 @@ # if HAVE_SYS_SOCKETVAR_H # include # endif -@@ -80,7 +92,7 @@ +@@ -80,7 +95,7 @@ # include #endif #include @@ -33,7 +36,7 @@ # if HAVE_NETINET_IN_PCB_H # include # endif -@@ -575,7 +587,7 @@ +@@ -575,7 +590,7 @@ memcpy(result, &tmp, sizeof(tmp)); return 0; } @@ -42,7 +45,7 @@ q = (caddr_t) TAILQ_NEXT(&tmp, if_link); #else # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -806,7 +818,7 @@ +@@ -806,7 +821,7 @@ if (if_getifnet(interface, &ifnet) < 0) break; @@ -51,7 +54,7 @@ ifa = (caddr_t) TAILQ_FIRST(&ifnet.if_addrhead); #else # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -827,7 +839,7 @@ +@@ -827,7 +842,7 @@ *var_len = sdl.sdl_alen; return (u_char *) (sdl.sdl_data + sdl.sdl_nlen); } @@ -60,7 +63,7 @@ ifa = (caddr_t) TAILQ_NEXT(&ifaddr, ifa_link); #else # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -1220,32 +1232,33 @@ +@@ -1220,32 +1235,33 @@ size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { @@ -103,7 +106,7 @@ if (!auto_nlist("udb6", (char *) &udb6, sizeof(udb6))) return NULL; p = (caddr_t) udb6.in6p_next; -@@ -1274,41 +1287,44 @@ +@@ -1274,41 +1290,44 @@ (int) vp->namelen * sizeof(oid)); DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); while ( @@ -161,7 +164,7 @@ else newname[j++] = 0; /*XXX*/ -@@ -1319,7 +1335,7 @@ +@@ -1319,7 +1338,7 @@ result = snmp_oid_compare(name, *length, newname, j); if (exact && (result == 0)) { @@ -170,7 +173,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1330,7 +1346,7 @@ +@@ -1330,7 +1349,7 @@ */ if ((savnameLen == 0) || (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { @@ -179,7 +182,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1338,15 +1354,15 @@ +@@ -1338,15 +1357,15 @@ } skip: @@ -200,7 +203,7 @@ free(sysctl_buf); #endif DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1354,7 +1370,7 @@ +@@ -1354,7 +1373,7 @@ return NULL; *length = savnameLen; memcpy((char *) name, (char *) savname, *length * sizeof(oid)); @@ -209,7 +212,7 @@ *write_method = 0; *var_len = sizeof(long); /* default to 'long' results */ -@@ -1367,14 +1383,14 @@ +@@ -1367,14 +1386,14 @@ switch (vp->magic) { case IPV6UDPLOCALADDRESS: *var_len = sizeof(struct in6_addr); @@ -228,7 +231,7 @@ else long_return = 0; /*XXX*/ return (u_char *) & long_return; -@@ -1392,24 +1408,24 @@ +@@ -1392,24 +1411,24 @@ size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { @@ -260,7 +263,7 @@ #endif if (!initialized) { -@@ -1431,11 +1447,11 @@ +@@ -1431,11 +1450,11 @@ DEBUGMSGOID(("mibII/ipv6", name, *length)); DEBUGMSG(("mibII/ipv6", " %d\n", exact)); @@ -274,7 +277,7 @@ if (!auto_nlist("tcb6", (char *) &tcb6, sizeof(tcb6))) return NULL; p = (caddr_t) tcb6.in6p_next; -@@ -1464,9 +1480,10 @@ +@@ -1464,9 +1483,10 @@ (int) vp->namelen * sizeof(oid)); DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); while ( @@ -287,7 +290,7 @@ p && (u_long) p != auto_nlist_value("tcb6") #else xig->xig_len > sizeof(struct xinpgen) -@@ -1474,41 +1491,43 @@ +@@ -1474,41 +1494,43 @@ ) { DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p)); @@ -346,7 +349,7 @@ else newname[j++] = 0; /*XXX*/ newname[j++] = tcp6statemap[tcp6cb.t_state]; -@@ -1519,13 +1538,13 @@ +@@ -1519,13 +1541,13 @@ DEBUGMSG(("mibII/ipv6", " %d\n", exact)); #if 1 /* this is very odd but sometimes happen, and cause infinite loop */ @@ -362,7 +365,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1536,7 +1555,7 @@ +@@ -1536,7 +1558,7 @@ */ if ((savnameLen == 0) || (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { @@ -371,7 +374,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1544,15 +1563,15 @@ +@@ -1544,15 +1566,15 @@ } skip: @@ -392,7 +395,7 @@ free(sysctl_buf); #endif DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1573,20 +1592,20 @@ +@@ -1573,20 +1595,20 @@ switch (vp->magic) { case IPV6TCPLOCALADDR: *var_len = sizeof(struct in6_addr); @@ -419,7 +422,7 @@ else long_return = 0; /*XXX*/ return (u_char *) & long_return; -@@ -1633,22 +1652,23 @@ +@@ -1633,22 +1655,23 @@ size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { @@ -450,7 +453,7 @@ #endif DEBUGMSGTL(("mibII/ipv6", "var_tcp6: ")); -@@ -1688,9 +1708,9 @@ +@@ -1688,9 +1711,9 @@ (int) vp->namelen * sizeof(oid)); DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); while ( @@ -462,7 +465,7 @@ p && (u_long) p != auto_nlist_value("tcb6") #else xig->xig_len > sizeof(struct xinpgen) -@@ -1698,41 +1718,43 @@ +@@ -1698,41 +1721,43 @@ ) { DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p)); @@ -522,7 +525,7 @@ else newname[j++] = 0; /*XXX*/ newname[j++] = mapTcpState((int)tcpcb.t_state); -@@ -1743,12 +1765,12 @@ +@@ -1743,12 +1768,12 @@ DEBUGMSG(("mibII/ipv6", " %d\n", exact)); #if 1 /* this is very odd but sometimes happen, and cause infinite loop */ @@ -537,7 +540,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1759,7 +1781,7 @@ +@@ -1759,7 +1784,7 @@ */ if ((savnameLen == 0) || (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { @@ -546,7 +549,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1767,15 +1789,15 @@ +@@ -1767,15 +1792,15 @@ } skip: @@ -567,7 +570,7 @@ free(sysctl_buf); #endif DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1783,7 +1805,7 @@ +@@ -1783,7 +1808,7 @@ return NULL; *length = savnameLen; memcpy((char *) name, (char *) savname, *length * sizeof(oid)); @@ -576,7 +579,7 @@ *write_method = 0; *var_len = sizeof(long); /* default to 'long' results */ -@@ -1796,20 +1818,20 @@ +@@ -1796,20 +1821,20 @@ switch (vp->magic) { case IPV6TCPLOCALADDR: *var_len = sizeof(struct in6_addr);