Date: Sat, 28 Mar 2009 02:58:37 -0500 From: Scot Hetzel <swhetzel@gmail.com> To: FreeBSD-gnats-submit@freebsd.org, freebsd-bugs@freebsd.org Subject: Re: misc/133152: net-mgmt/net-snmp: fails building on recent -CURRENT Message-ID: <790a9fff0903280058v36ad2824naf8b877333849e1f@mail.gmail.com> In-Reply-To: <200903280750.n2S7o29a003252@freefall.freebsd.org> References: <200903280747.n2S7lTao005960@www.freebsd.org> <200903280750.n2S7o29a003252@freefall.freebsd.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Sat, Mar 28, 2009 at 2:50 AM, <FreeBSD-gnats-submit@freebsd.org> wrote:
> Thank you very much for your problem report.
> It has the internal identification `misc/133152'.
> The individual assigned to look at your
> report is: freebsd-bugs.
>
This should be a ports PR, please change it.
I have also attached my first patch, which changes the in6p_* macros to inp_*.
Either version can be used to build net-mgmt/net-snmp.
Thanks,
Scot
[-- Attachment #2 --]
--- agent/mibgroup/mibII/ipv6.c.orig 2009-03-28 01:27:21.421079000 -0500
+++ agent/mibgroup/mibII/ipv6.c 2009-03-28 02:04:54.974806106 -0500
@@ -1332,7 +1332,7 @@
j = (int) vp->namelen;
for (i = 0; i < sizeof(struct in6_addr); i++)
newname[j++] = tstpcb.in6p_laddr.s6_addr[i];
- newname[j++] = ntohs(tstpcb.in6p_lport);
+ newname[j++] = ntohs(tstpcb.inp_lport);
if (IN6_IS_ADDR_LINKLOCAL(&tstpcb.in6p_laddr))
newname[j++] =
ntohs(*(uint16_t *) & tstpcb.in6p_laddr.s6_addr[2]);
@@ -1396,7 +1396,7 @@
*var_len = sizeof(struct in6_addr);
return savpcb.in6p_laddr.s6_addr;
case IPV6UDPLOCALPORT:
- long_return = ntohs(savpcb.in6p_lport);
+ long_return = ntohs(savpcb.inp_lport);
return (u_char *) & long_return;
case IPV6UDPIFINDEX:
if (IN6_IS_ADDR_LINKLOCAL(&savpcb.in6p_laddr))
@@ -1519,19 +1519,19 @@
if (0 == (tstpcb.inp_vflag & INP_IPV6))
goto skip;
#endif
- if (!NETSNMP_KLOOKUP(tstpcb.in6p_ppcb, (char *) &tcp6cb, sizeof(tcp6cb))) {
+ if (!NETSNMP_KLOOKUP(tstpcb.inp_ppcb, (char *) &tcp6cb, sizeof(tcp6cb))) {
DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6.tcp6cb at %x\n",
- tstpcb.in6p_ppcb));
+ tstpcb.inp_ppcb));
found = 0;
break;
}
j = (int) vp->namelen;
for (i = 0; i < sizeof(struct in6_addr); i++)
newname[j++] = tstpcb.in6p_laddr.s6_addr[i];
- newname[j++] = ntohs(tstpcb.in6p_lport);
+ newname[j++] = ntohs(tstpcb.inp_lport);
for (i = 0; i < sizeof(struct in6_addr); i++)
newname[j++] = tstpcb.in6p_faddr.s6_addr[i];
- newname[j++] = ntohs(tstpcb.in6p_fport);
+ newname[j++] = ntohs(tstpcb.inp_fport);
if (IN6_IS_ADDR_LINKLOCAL(&tstpcb.in6p_laddr))
newname[j++] =
ntohs(*(uint16_t *) & tstpcb.in6p_laddr.s6_addr[2]);
@@ -1545,7 +1545,7 @@
DEBUGMSG(("mibII/ipv6", " %d\n", exact));
#if 1 /* this is very odd but sometimes happen, and cause infinite loop */
- if (ntohs(tstpcb.in6p_lport) == 0)
+ if (ntohs(tstpcb.inp_lport) == 0)
goto skip;
#endif
@@ -1601,13 +1601,13 @@
*var_len = sizeof(struct in6_addr);
return (u_char *) & savpcb.in6p_laddr.s6_addr[0];
case IPV6TCPLOCALPORT:
- long_return = ntohs(savpcb.in6p_lport);
+ long_return = ntohs(savpcb.inp_lport);
return (u_char *) & long_return;
case IPV6TCPREMOTEADDR:
*var_len = sizeof(struct in6_addr);
return (u_char *) & savpcb.in6p_faddr.s6_addr[0];
case IPV6TCPREMOTEPORT:
- long_return = ntohs(savpcb.in6p_fport);
+ long_return = ntohs(savpcb.inp_fport);
return (u_char *) & long_return;
case IPV6TCPIFINDEX:
if (IN6_IS_ADDR_LINKLOCAL(&savpcb.in6p_laddr))
@@ -1742,19 +1742,19 @@
if (0 == (tstpcb.inp_vflag & INP_IPV6))
goto skip;
#endif
- if (!NETSNMP_KLOOKUP(tstpcb.in6p_ppcb, (char *) &tcpcb, sizeof(tcpcb))) {
+ if (!NETSNMP_KLOOKUP(tstpcb.inp_ppcb, (char *) &tcpcb, sizeof(tcpcb))) {
DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6.tcpcb at %x\n",
- tstpcb.in6p_ppcb));
+ tstpcb.inp_ppcb));
found = 0;
break;
}
j = (int) vp->namelen;
for (i = 0; i < sizeof(struct in6_addr); i++)
newname[j++] = tstpcb.in6p_laddr.s6_addr[i];
- newname[j++] = ntohs(tstpcb.in6p_lport);
+ newname[j++] = ntohs(tstpcb.inp_lport);
for (i = 0; i < sizeof(struct in6_addr); i++)
newname[j++] = tstpcb.in6p_faddr.s6_addr[i];
- newname[j++] = ntohs(tstpcb.in6p_fport);
+ newname[j++] = ntohs(tstpcb.inp_fport);
if (IN6_IS_ADDR_LINKLOCAL(&tstpcb.in6p_laddr))
newname[j++] =
ntohs(*(uint16_t *) & tstpcb.in6p_laddr.s6_addr[2]);
@@ -1768,7 +1768,7 @@
DEBUGMSG(("mibII/ipv6", " %d\n", exact));
#if 1 /* this is very odd but sometimes happen, and cause infinite loop */
- if (ntohs(tstpcb.in6p_lport) == 0)
+ if (ntohs(tstpcb.inp_lport) == 0)
goto skip;
#endif
result = snmp_oid_compare(name, *length, newname, j);
@@ -1823,13 +1823,13 @@
*var_len = sizeof(struct in6_addr);
return (u_char *) & savpcb.in6p_laddr.s6_addr[0];
case IPV6TCPLOCALPORT:
- long_return = ntohs(savpcb.in6p_lport);
+ long_return = ntohs(savpcb.inp_lport);
return (u_char *) & long_return;
case IPV6TCPREMOTEADDR:
*var_len = sizeof(struct in6_addr);
return (u_char *) & savpcb.in6p_faddr.s6_addr[0];
case IPV6TCPREMOTEPORT:
- long_return = ntohs(savpcb.in6p_fport);
+ long_return = ntohs(savpcb.inp_fport);
return (u_char *) & long_return;
case IPV6TCPIFINDEX:
if (IN6_IS_ADDR_LINKLOCAL(&savpcb.in6p_laddr))
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff0903280058v36ad2824naf8b877333849e1f>
