netfilter 01/09: remove "happy cracking" message
authorPatrick McHardy <kaber@trash.net>
Mon, 12 Jan 2009 00:06:00 +0000 (00:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Jan 2009 05:18:33 +0000 (21:18 -0800)
Don't spam logs for locally generated short packets. these can only
be generated by root.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/iptable_filter.c
net/ipv4/netfilter/iptable_mangle.c
net/ipv4/netfilter/iptable_raw.c
net/ipv4/netfilter/iptable_security.c
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c

index c9224310ebae68c8573292e06dd1ebd02f21d9ec..52cb6939d093f67f19af6a5c2b69d7fdf46c1921 100644 (file)
@@ -93,13 +93,8 @@ ipt_local_out_hook(unsigned int hook,
 {
        /* root is playing with raw sockets. */
        if (skb->len < sizeof(struct iphdr) ||
-           ip_hdrlen(skb) < sizeof(struct iphdr)) {
-               if (net_ratelimit())
-                       printk("iptable_filter: ignoring short SOCK_RAW "
-                              "packet.\n");
+           ip_hdrlen(skb) < sizeof(struct iphdr))
                return NF_ACCEPT;
-       }
-
        return ipt_do_table(skb, hook, in, out,
                            dev_net(out)->ipv4.iptable_filter);
 }
index 69f2c4287146a078b4f33910591bb30ec73797fd..3929d20b9e452aa33d92f29502b1ccb3fc47c306 100644 (file)
@@ -132,12 +132,8 @@ ipt_local_hook(unsigned int hook,
 
        /* root is playing with raw sockets. */
        if (skb->len < sizeof(struct iphdr)
-           || ip_hdrlen(skb) < sizeof(struct iphdr)) {
-               if (net_ratelimit())
-                       printk("iptable_mangle: ignoring short SOCK_RAW "
-                              "packet.\n");
+           || ip_hdrlen(skb) < sizeof(struct iphdr))
                return NF_ACCEPT;
-       }
 
        /* Save things which could affect route */
        mark = skb->mark;
index 8faebfe638f1fab623f6d528d031720aa6ad4dc7..7f65d18333e3ad195f8f03e6accb86c89612dd55 100644 (file)
@@ -65,12 +65,8 @@ ipt_local_hook(unsigned int hook,
 {
        /* root is playing with raw sockets. */
        if (skb->len < sizeof(struct iphdr) ||
-           ip_hdrlen(skb) < sizeof(struct iphdr)) {
-               if (net_ratelimit())
-                       printk("iptable_raw: ignoring short SOCK_RAW "
-                              "packet.\n");
+           ip_hdrlen(skb) < sizeof(struct iphdr))
                return NF_ACCEPT;
-       }
        return ipt_do_table(skb, hook, in, out,
                            dev_net(out)->ipv4.iptable_raw);
 }
index 36f3be3cc4285ece3804fbabecc6e238fdd6756e..a52a35f4a584fbc34b95a1f55c86e2ea62133731 100644 (file)
@@ -96,12 +96,8 @@ ipt_local_out_hook(unsigned int hook,
 {
        /* Somebody is playing with raw sockets. */
        if (skb->len < sizeof(struct iphdr)
-           || ip_hdrlen(skb) < sizeof(struct iphdr)) {
-               if (net_ratelimit())
-                       printk(KERN_INFO "iptable_security: ignoring short "
-                              "SOCK_RAW packet.\n");
+           || ip_hdrlen(skb) < sizeof(struct iphdr))
                return NF_ACCEPT;
-       }
        return ipt_do_table(skb, hook, in, out,
                            dev_net(out)->ipv4.iptable_security);
 }
index b2141e11575ebb33cb93deec8202525a70348eb5..4beb04fac588720b0b114ed2f68e8fe5be448e90 100644 (file)
@@ -145,11 +145,8 @@ static unsigned int ipv4_conntrack_local(unsigned int hooknum,
 {
        /* root is playing with raw sockets. */
        if (skb->len < sizeof(struct iphdr) ||
-           ip_hdrlen(skb) < sizeof(struct iphdr)) {
-               if (net_ratelimit())
-                       printk("ipt_hook: happy cracking.\n");
+           ip_hdrlen(skb) < sizeof(struct iphdr))
                return NF_ACCEPT;
-       }
        return nf_conntrack_in(dev_net(out), PF_INET, hooknum, skb);
 }