All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix format specifier for netfilter log targets
@ 2006-05-15  8:56 Philip Craig
  2006-05-15 11:40 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Philip Craig @ 2006-05-15  8:56 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: netfilter-devel

The prefix argument for nf_log_packet is a format specifier,
so don't pass the user defined string directly to it.

Signed-off-by: Philip Craig <philipc@snapgear.com>

Index: linux-2.6.x/net/ipv4/netfilter/ipt_LOG.c
===================================================================
RCS file: /cvs/sw/linux-2.6.x/net/ipv4/netfilter/ipt_LOG.c,v
retrieving revision 1.1.1.16
diff -u -p -r1.1.1.16 ipt_LOG.c
--- linux-2.6.x/net/ipv4/netfilter/ipt_LOG.c	21 Mar 2006 01:35:40 -0000	1.1.1.16
+++ linux-2.6.x/net/ipv4/netfilter/ipt_LOG.c	15 May 2006 08:44:39 -0000
@@ -427,7 +427,7 @@ ipt_log_target(struct sk_buff **pskb,

 	if (loginfo->logflags & IPT_LOG_NFLOG)
 		nf_log_packet(PF_INET, hooknum, *pskb, in, out, &li,
-		              loginfo->prefix);
+		              "%s", loginfo->prefix);
 	else
 		ipt_log_packet(PF_INET, hooknum, *pskb, in, out, &li,
 		               loginfo->prefix);
Index: linux-2.6.x/net/ipv6/netfilter/ip6t_LOG.c
===================================================================
RCS file: /cvs/sw/linux-2.6.x/net/ipv6/netfilter/ip6t_LOG.c,v
retrieving revision 1.1.1.14
diff -u -p -r1.1.1.14 ip6t_LOG.c
--- linux-2.6.x/net/ipv6/netfilter/ip6t_LOG.c	21 Mar 2006 01:35:41 -0000	1.1.1.14
+++ linux-2.6.x/net/ipv6/netfilter/ip6t_LOG.c	15 May 2006 08:44:39 -0000
@@ -438,7 +438,7 @@ ip6t_log_target(struct sk_buff **pskb,

 	if (loginfo->logflags & IP6T_LOG_NFLOG)
 		nf_log_packet(PF_INET6, hooknum, *pskb, in, out, &li,
-		              loginfo->prefix);
+		              "%s", loginfo->prefix);
 	else
 		ip6t_log_packet(PF_INET6, hooknum, *pskb, in, out, &li,
 		                loginfo->prefix);
Index: linux-2.6.x/net/bridge/netfilter/ebt_log.c
===================================================================
RCS file: /cvs/sw/linux-2.6.x/net/bridge/netfilter/ebt_log.c,v
retrieving revision 1.1.1.9
diff -u -p -r1.1.1.9 ebt_log.c
--- linux-2.6.x/net/bridge/netfilter/ebt_log.c	21 Mar 2006 01:35:39 -0000	1.1.1.9
+++ linux-2.6.x/net/bridge/netfilter/ebt_log.c	15 May 2006 08:44:39 -0000
@@ -168,7 +168,7 @@ static void ebt_log(const struct sk_buff

 	if (info->bitmask & EBT_LOG_NFLOG)
 		nf_log_packet(PF_BRIDGE, hooknr, skb, in, out, &li,
-		              info->prefix);
+		              "%s", info->prefix);
 	else
 		ebt_log_packet(PF_BRIDGE, hooknr, skb, in, out, &li,
 		               info->prefix);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fix format specifier for netfilter log targets
  2006-05-15  8:56 [PATCH] fix format specifier for netfilter log targets Philip Craig
@ 2006-05-15 11:40 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2006-05-15 11:40 UTC (permalink / raw)
  To: Philip Craig; +Cc: netfilter-devel

Philip Craig wrote:
> The prefix argument for nf_log_packet is a format specifier,
> so don't pass the user defined string directly to it.

This part is going to get removed again, but for now it seems
reasonable anyway. Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-05-15 11:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-15  8:56 [PATCH] fix format specifier for netfilter log targets Philip Craig
2006-05-15 11:40 ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.