Skip to contentSkip to conversation

: fix format specifier for netfilter log targets

PATCH New Patrick McHardy 1 participant 1 message May 17, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 : fix format specifier for netfilter log targets

[NETFILTER]: fix format specifier for netfilter log targets

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

---
commit 4c2e54ad6dc1f0086f7eec94f8fbb57f91866f8b
tree 5f52982e53f964beffa33c1500d54613596a0723
parent 6bf69b5660fafbbb8bfeebcfd53efee8ab419ff1
author Philip Craig <[email protected]> Wed, 17 May 2006 09:36:30 +0200 committer Patrick McHardy <[email protected]> Wed, 17 May 2006 09:36:30 +0200

 net/bridge/netfilter/ebt_log.c |    2 +-
 net/ipv4/netfilter/ipt_LOG.c   |    2 +-
 net/ipv6/netfilter/ip6t_LOG.c  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
net/bridge/netfilter/ebt_log.c +1 -1
index d159c92..466ed34 100644
@@ -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);
net/ipv4/netfilter/ipt_LOG.c +1 -1
index 39fd4c2..b98f7b0 100644
@@ -428,7 +428,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);
net/ipv6/netfilter/ip6t_LOG.c +1 -1
index a96c0de..73c6300 100644
@@ -439,7 +439,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);