From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jul 18 03:30:23 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62B5616A41C for ; Mon, 18 Jul 2005 03:30:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 96A4E43D53 for ; Mon, 18 Jul 2005 03:30:22 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j6I3ULnd032964 for ; Mon, 18 Jul 2005 03:30:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j6I3ULuv032963; Mon, 18 Jul 2005 03:30:21 GMT (envelope-from gnats) Resent-Date: Mon, 18 Jul 2005 03:30:21 GMT Resent-Message-Id: <200507180330.j6I3ULuv032963@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yen-Ming Lee Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9430416A41C; Mon, 18 Jul 2005 03:20:45 +0000 (GMT) (envelope-from leeym@utopia.leeym.com) Received: from msr68.hinet.net (msr68.hinet.net [168.95.4.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98A1643D60; Mon, 18 Jul 2005 03:20:41 +0000 (GMT) (envelope-from leeym@utopia.leeym.com) Received: from utopia.leeym.com (utopia.leeym.com [211.21.137.52]) by msr68.hinet.net (8.9.3/8.9.3) with ESMTP id LAA00624; Mon, 18 Jul 2005 11:20:38 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by utopia.leeym.com (Postfix) with ESMTP id 9D6FFB29D12; Mon, 18 Jul 2005 11:20:37 +0800 (CST) Received: from utopia.leeym.com ([127.0.0.1]) by localhost (utopia.leeym.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 88931-04; Mon, 18 Jul 2005 11:20:31 +0800 (CST) Received: by utopia.leeym.com (Postfix, from userid 1000) id A4948B29CD1; Mon, 18 Jul 2005 11:20:31 +0800 (CST) Message-Id: <20050718032031.A4948B29CD1@utopia.leeym.com> Date: Mon, 18 Jul 2005 11:20:31 +0800 (CST) From: Yen-Ming Lee To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: kuriyama@FreeBSD.org Subject: ports/83643: [PATCH] net-mgmt/net-snmp: remove redundant patch X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2005 03:30:23 -0000 >Number: 83643 >Category: ports >Synopsis: [PATCH] net-mgmt/net-snmp: remove redundant patch >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jul 18 03:30:21 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Yen-Ming Lee >Release: FreeBSD 5.4-STABLE i386 >Organization: FreeBSD Taiwan >Environment: System: FreeBSD utopia.leeym.com 5.4-STABLE FreeBSD 5.4-STABLE #0: Sun Jul 17 07:50:25 CST 2005 >Description: - the INETADDRESS feature is supported by default, the patch is no longer needed Noticed by: rehula@yahoo-inc.com Removed file(s): - files/extra-patch-snmplib::mib.c Port maintainer (kuriyama@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.63 >How-To-Repeat: >Fix: --- net-snmp-5.2.1.2.patch begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/net-mgmt/net-snmp/Makefile,v retrieving revision 1.126 diff -u -u -r1.126 Makefile --- Makefile 13 Jul 2005 02:37:23 -0000 1.126 +++ Makefile 18 Jul 2005 03:18:24 -0000 @@ -16,9 +16,6 @@ MAINTAINER= kuriyama@FreeBSD.org COMMENT= An extendable SNMP implementation -.if defined(WITH_INETADDRESS_HACK) -EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-snmplib::mib.c -.endif .if !defined(WITH_TKMIB) EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-local:Makefile.in .endif Index: files/extra-patch-snmplib::mib.c =================================================================== RCS file: files/extra-patch-snmplib::mib.c diff -N files/extra-patch-snmplib::mib.c --- files/extra-patch-snmplib::mib.c 3 Jan 2004 03:18:29 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,136 +0,0 @@ ---- snmplib/mib.c.orig Sun Nov 2 12:50:39 2003 -+++ snmplib/mib.c Sat Jan 3 03:08:38 2004 -@@ -167,6 +167,14 @@ - {NULL, 0} /* end of list */ - }; - -+enum inet_address_type { -+ IPV4 = 1, -+ IPV6 = 2, -+ IPV4Z = 3, -+ IPV6Z = 4, -+ DNS = 16 -+}; -+ - - /** - * @internal -@@ -3734,6 +3742,80 @@ - return SNMPERR_SUCCESS; - } - -+/* -+ * dump_realloc_oid_to_inetaddress: -+ * return 1 for success, -+ * return 0 for failure, -+ * return 2 for not handled -+ */ -+ -+int -+dump_realloc_oid_to_inetaddress(const int addr_type, const oid * objid, size_t objidlen, -+ u_char ** buf, size_t * buf_len, -+ size_t * out_len, int allow_realloc, -+ char quotechar) -+{ -+ if (buf) { -+ int i, len; -+ char intbuf[64], * p; -+ u_int32_t zone; -+ -+ memset(intbuf, 0, 64); -+ -+ p = intbuf; -+ *p = quotechar; -+ p++; -+ switch (addr_type) { -+ case IPV4: -+ case IPV4Z: -+ if ((addr_type == IPV4 && objidlen != 4) || -+ (addr_type == IPV4Z && objidlen != 8)) -+ return 2; -+ -+ len = sprintf(p, "%lu.%lu.%lu.%lu", objid[0], objid[1], objid[2], objid[3]); -+ p += len; -+ if (addr_type == IPV4Z) { -+ zone = ntohl(*((u_int32_t *) objid[4])); -+ len = sprintf(p, "\%%lu", zone); -+ p += len; -+ } -+ -+ break; -+ -+ case IPV6: -+ case IPV6Z: -+ if ((addr_type == IPV6 && objidlen != 16) || -+ (addr_type == IPV6Z && objidlen != 20)) -+ return 2; -+ -+ len = 0; -+ for (i = 0; i < 16; i ++) { -+ len += snprintf(p, 4, "%02x:", objid[i]); -+ p += 3; -+ } -+ p-- ; /* do not include the last ':' */ -+ -+ if (addr_type == IPV6Z) { -+ zone = ntohl(*((u_int32_t *) objid[4])); -+ len = sprintf(p, "\%%lu", zone); -+ p += len; -+ } -+ -+ break; -+ -+ case DNS: -+ default: -+ /* DNS can just be handled by dump_realloc_oid_to_string() */ -+ return 2; -+ } -+ -+ *p = quotechar; -+ return snmp_strcat(buf, buf_len, out_len, allow_realloc, -+ (const u_char *) intbuf); -+ } -+ return 1; -+} -+ - int - dump_realloc_oid_to_string(const oid * objid, size_t objidlen, - u_char ** buf, size_t * buf_len, -@@ -4043,7 +4125,36 @@ - } - } else { - if (!*buf_overflow) { -- if (!dump_realloc_oid_to_string -+ struct tree * next_peer; -+ int normal_handling = 1; -+ -+ if (tp->next_peer) { -+ next_peer = tp->next_peer; -+ } -+ -+ /* Try handling the InetAddress in the OID, in case of failure, -+ * use the normal_handling. -+ */ -+ if (tp->next_peer && -+ strcmp(get_tc_descriptor(tp->tc_index), "InetAddress") == 0 && -+ strcmp(get_tc_descriptor(next_peer->tc_index), -+ "InetAddressType") == 0 ) { -+ -+ int ret; -+ int addr_type = *(objid - 1); -+ -+ ret = dump_realloc_oid_to_inetaddress(addr_type, -+ objid + 1, numids - 1, buf, buf_len, out_len, -+ allow_realloc, '"'); -+ if (ret != 2) { -+ normal_handling = 0; -+ if (ret == 0) { -+ *buf_overflow = 1; -+ } -+ -+ } -+ } -+ if (normal_handling && !dump_realloc_oid_to_string - (objid + 1, numids - 1, buf, buf_len, out_len, - allow_realloc, '"')) { - *buf_overflow = 1; --- net-snmp-5.2.1.2.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: