From 6525dc50c78a127470d96f83f4b75bfa89096c94 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Mon, 10 Jan 2005 19:06:38 +0000 Subject: [PATCH] - fix DEBUGP() macro; newer gcc versions refuse to concatenate __FILE__ and __FUNCTION__ - fix DUMP_TUPLE_GRE() macro - 2.6.9 changed print_tuple() and print_conntrack() methods to use seq_printf(), but we are running 2.6.8, so change to just sprintf() --- net/ipv4/netfilter/ip_conntrack_proto_gre.c | 25 ++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/net/ipv4/netfilter/ip_conntrack_proto_gre.c b/net/ipv4/netfilter/ip_conntrack_proto_gre.c index 2694e9571..edccfe843 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_gre.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_gre.c @@ -55,9 +55,8 @@ MODULE_DESCRIPTION("netfilter connection tracking protocol helper for GRE"); #define GRE_STREAM_TIMEOUT (180*HZ) #if 0 -#define DEBUGP(format, args...) printk(KERN_DEBUG __FILE__ ":" __FUNCTION__ \ - ": " format, ## args) -#define DUMP_TUPLE_GRE(x) printk("%u.%u.%u.%u:0x%x -> %u.%u.%u.%u:0x%x:%u:0x%x\n", \ +#define DEBUGP(format, args...) printk(KERN_DEBUG "%s:%s: " format, __FILE__, __FUNCTION__, ## args) +#define DUMP_TUPLE_GRE(x) printk("%u.%u.%u.%u:0x%x -> %u.%u.%u.%u:0x%x\n", \ NIPQUAD((x)->src.ip), ntohl((x)->src.u.gre.key), \ NIPQUAD((x)->dst.ip), ntohl((x)->dst.u.gre.key)) #else @@ -222,21 +221,21 @@ static int gre_pkt_to_tuple(const struct sk_buff *skb, } /* print gre part of tuple */ -static int gre_print_tuple(struct seq_file *s, - const struct ip_conntrack_tuple *tuple) +static unsigned int gre_print_tuple(char *buffer, + const struct ip_conntrack_tuple *tuple) { - return seq_printf(s, "srckey=0x%x dstkey=0x%x ", - ntohl(tuple->src.u.gre.key), - ntohl(tuple->dst.u.gre.key)); + return sprintf(buffer, "srckey=0x%x dstkey=0x%x ", + ntohl(tuple->src.u.gre.key), + ntohl(tuple->dst.u.gre.key)); } /* print private data for conntrack */ -static int gre_print_conntrack(struct seq_file *s, - const struct ip_conntrack *ct) +static unsigned int gre_print_conntrack(char *buffer, + const struct ip_conntrack *ct) { - return seq_printf(s, "timeout=%u, stream_timeout=%u ", - (ct->proto.gre.timeout / HZ), - (ct->proto.gre.stream_timeout / HZ)); + return sprintf(buffer, "timeout=%u, stream_timeout=%u ", + (ct->proto.gre.timeout / HZ), + (ct->proto.gre.stream_timeout / HZ)); } /* Returns verdict for packet, and may modify conntrack */ -- 2.47.0