[NETFILTER]: fix format specifier for netfilter log targets
authorPhilip Craig <philipc@snapgear.com>
Fri, 19 May 2006 09:15:47 +0000 (02:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 May 2006 09:15:47 +0000 (02:15 -0700)
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>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/netfilter/ebt_log.c
net/ipv4/netfilter/ipt_LOG.c
net/ipv6/netfilter/ip6t_LOG.c

index d159c92cca84a0482757c5d58f12bd73a193adfa..466ed3440b7446b3c6d976963b3056eb7f6dc9f5 100644 (file)
@@ -168,7 +168,7 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
 
        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);
index 39fd4c2a2386248421a74795665bd50dda749293..b98f7b08b084586478ec431ec83485aa6118ff8c 100644 (file)
@@ -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);
index a96c0de14b00ed963b52a221cbaca428b46f483b..73c6300109d61d7243e89f5268d3d9fbe3ec3e30 100644 (file)
@@ -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);