Date: Tue, 10 Sep 2013 10:40:46 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r326891 - head/security/prelude-pflogger/files Message-ID: <201309101040.r8AAekWH019172@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309101040.r8AAekWH019172>