netfilter: Use unsigned types for hooknum and pf vars
[deliverable/linux.git] / net / ipv4 / netfilter / ipt_LOG.c
index b38d7850f506999f84691977ea4e6379a92cd34d..9330ba3577e11f5a35ca9894d7951b7bc0f8893d 100644 (file)
@@ -76,7 +76,8 @@ static void dump_packet(const struct nf_loginfo *info,
 
        if ((logflags & IPT_LOG_IPOPT)
            && ih->ihl * 4 > sizeof(struct iphdr)) {
-               unsigned char _opt[4 * 15 - sizeof(struct iphdr)], *op;
+               const unsigned char *op;
+               unsigned char _opt[4 * 15 - sizeof(struct iphdr)];
                unsigned int i, optsize;
 
                optsize = ih->ihl * 4 - sizeof(struct iphdr);
@@ -338,12 +339,16 @@ static void dump_packet(const struct nf_loginfo *info,
        if ((logflags & IPT_LOG_UID) && !iphoff && skb->sk) {
                read_lock_bh(&skb->sk->sk_callback_lock);
                if (skb->sk->sk_socket && skb->sk->sk_socket->file)
-                       printk("UID=%u GID=%u",
+                       printk("UID=%u GID=%u ",
                                skb->sk->sk_socket->file->f_uid,
                                skb->sk->sk_socket->file->f_gid);
                read_unlock_bh(&skb->sk->sk_callback_lock);
        }
 
+       /* Max length: 16 "MARK=0xFFFFFFFF " */
+       if (!iphoff && skb->mark)
+               printk("MARK=0x%x ", skb->mark);
+
        /* Proto    Max log string length */
        /* IP:      40+46+6+11+127 = 230 */
        /* TCP:     10+max(25,20+30+13+9+32+11+127) = 252 */
@@ -370,7 +375,7 @@ static struct nf_loginfo default_loginfo = {
 };
 
 static void
-ipt_log_packet(unsigned int pf,
+ipt_log_packet(u_int8_t pf,
               unsigned int hooknum,
               const struct sk_buff *skb,
               const struct net_device *in,
This page took 0.025366 seconds and 5 git commands to generate.