net: skb->rtable accessor
[safe/jmp/linux-2.6] / net / ipv6 / netfilter / ip6t_LOG.c
index 02885e8..7018cac 100644 (file)
@@ -364,8 +364,8 @@ static void dump_packet(const struct nf_loginfo *info,
                read_lock_bh(&skb->sk->sk_callback_lock);
                if (skb->sk->sk_socket && skb->sk->sk_socket->file)
                        printk("UID=%u GID=%u ",
-                               skb->sk->sk_socket->file->f_uid,
-                               skb->sk->sk_socket->file->f_gid);
+                               skb->sk->sk_socket->file->f_cred->fsuid,
+                               skb->sk->sk_socket->file->f_cred->fsgid);
                read_unlock_bh(&skb->sk->sk_callback_lock);
        }
 
@@ -424,9 +424,8 @@ ip6t_log_packet(u_int8_t pf,
                        if (skb->dev->type == ARPHRD_SIT) {
                                const struct iphdr *iph =
                                        (struct iphdr *)skb_mac_header(skb);
-                               printk("TUNNEL=%u.%u.%u.%u->%u.%u.%u.%u ",
-                                      NIPQUAD(iph->saddr),
-                                      NIPQUAD(iph->daddr));
+                               printk("TUNNEL=%pI4->%pI4 ",
+                                      &iph->saddr, &iph->daddr);
                        }
                } else
                        printk(" ");
@@ -478,7 +477,7 @@ static struct xt_target log_tg6_reg __read_mostly = {
        .me             = THIS_MODULE,
 };
 
-static const struct nf_logger ip6t_logger = {
+static struct nf_logger ip6t_logger __read_mostly = {
        .name           = "ip6t_LOG",
        .logfn          = &ip6t_log_packet,
        .me             = THIS_MODULE,