> Update of cvs.devel.squid-cache.org:/cvsroot/squid/squid3/src
>
> Modified Files:
> Tag: squid3-ipv6
> snmp_agent.cc
> Log Message:
> IP neutrality implemented acording to mib.txt
>
> Index: snmp_agent.cc
> ===================================================================
<snip>
The TYPE part is okay, but the address IPv6 bit below NEEDS to be wrapped
in USE_IPV6 for IPv4-only builds who never define in6_addr.
Possibly with an explicit IsIPv6 test and an error-catching else.
> ! case MESH_PTBL_ADDR:
> ! {
> ! Answer = snmp_var_new(Var->name, Var->name_length);
> ! // InetAddress doesn't have its own ASN.1 type,
> ! // like IpAddr does (SMI_IPADDRESS)
> ! // See: rfc4001.txt
> ! Answer->type = ASN_OCTET_STR;
> if (laddr.IsIPv4()) {
> ! Answer->val_len = sizeof(struct in_addr);
> ! struct in_addr *iaddr4 = (struct in_addr
> *)Answer->val.string;
> ! laddr.GetInAddr(*iaddr4);
}
#if USE_IPV6
else { /* It's an IPv6 value */
> ! Answer->val_len = sizeof(struct in6_addr);
> struct in6_addr *iaddr6 = (struct in6_addr
> *)Answer->val.string;
> laddr.GetInAddr(*iaddr6);
> }
#endif
> ! }
> break;
>
Amos
Received on Sun Oct 28 2007 - 19:02:18 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Oct 30 2007 - 13:00:03 MDT