I'm attempting to remove the obsolete sysctl description name macros from the tree, but this port uses CTL_IPPROTO_NAMES as a hack to map IP protocol numbers to names. A more portable solution is to use getprotobynumber(3) which queries /etc/protocols (and is POSIX). Fix: The attached patch should change the port to use getprotobynumber(3). It compiles, but I have no way to verify it works at runtime. Patch attached with submission follows:
Maintainer of security/prelude-pflogger, Please note that PR ports/181488 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/181488 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Responsible Changed From-To: freebsd-ports-bugs->bdrewery I'll take it.
Author: bdrewery Date: Tue Sep 10 10:40:46 2013 New Revision: 326891 URL: http://svnweb.freebsd.org/changeset/ports/326891 Log: - Fix build for upcoming HEAD changes by removing reference to CTL_IPPROTO_NAMES which is being removed and replacing with getprotobynumber(3) PR: ports/181488 Submitted by: jhb Approved by: maintainer timeout Modified: head/security/prelude-pflogger/files/patch-process_packet.c Modified: head/security/prelude-pflogger/files/patch-process_packet.c ============================================================================== --- head/security/prelude-pflogger/files/patch-process_packet.c Tue Sep 10 10:27:53 2013 (r326890) +++ head/security/prelude-pflogger/files/patch-process_packet.c Tue Sep 10 10:40:46 2013 (r326891) @@ -1,5 +1,5 @@ ---- src/process_packet.c.orig 2012-04-11 12:08:57.000000000 -0500 -+++ src/process_packet.c 2012-04-11 12:05:26.000000000 -0500 +--- src/process_packet.c.orig 2005-09-18 10:29:54.000000000 -0400 ++++ src/process_packet.c 2013-08-16 14:36:28.000000000 -0400 @@ -43,10 +43,10 @@ #include <net/if_pflog.h> #include <net/pfvar.h> @@ -12,3 +12,20 @@ #include <errno.h> #include <libprelude/prelude.h> +@@ -494,12 +494,12 @@ + char *dir_str, + char *buffer, size_t size) + { +- struct { char *name; int n; } ip_proto_table[] = CTL_IPPROTO_NAMES; ++ struct protoent *proto; + char *proto_name = "unknown"; + +- if ( packet_info->ip_proto_type < sizeof (ip_proto_table) / sizeof (ip_proto_table[0]) && +- ip_proto_table[packet_info->ip_proto_type].name ) +- proto_name = ip_proto_table[packet_info->ip_proto_type].name; ++ proto = getprotobynumber(packet_info->ip_proto_type); ++ if (proto != NULL) ++ proto_name = proto->p_name; + + return snprintf(buffer, size, + "OpenBSD PF %s an %s %s packet %s -> %s on interface %s (TTL:%hhu)", _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: feedback->closed Committed. Thanks!