diff options
author | Bryan Drewery <bdrewery@FreeBSD.org> | 2013-09-10 10:40:46 +0000 |
---|---|---|
committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2013-09-10 10:40:46 +0000 |
commit | 8db4f62979407d6708936eb3490e3fc978afd4cc (patch) | |
tree | 424e77649c35aac727f8d79d1e777d4f4fd3c032 /security/prelude-pflogger | |
parent | e716b29c1490c209ed288da686d77888e54510bb (diff) | |
download | ports-8db4f62979407d6708936eb3490e3fc978afd4cc.tar.gz ports-8db4f62979407d6708936eb3490e3fc978afd4cc.zip |
Notes
Diffstat (limited to 'security/prelude-pflogger')
-rw-r--r-- | security/prelude-pflogger/files/patch-process_packet.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/security/prelude-pflogger/files/patch-process_packet.c b/security/prelude-pflogger/files/patch-process_packet.c index b91380a6f687..21be4a62e4d3 100644 --- a/security/prelude-pflogger/files/patch-process_packet.c +++ b/security/prelude-pflogger/files/patch-process_packet.c @@ -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)", |