fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / net / ipv6 / netfilter / ip6t_LOG.c
index 73c6300..33b1faa 100644 (file)
@@ -69,9 +69,9 @@ static void dump_packet(const struct nf_loginfo *info,
        /* Max length: 44 "LEN=65535 TC=255 HOPLIMIT=255 FLOWLBL=FFFFF " */
        printk("LEN=%Zu TC=%u HOPLIMIT=%u FLOWLBL=%u ",
               ntohs(ih->payload_len) + sizeof(struct ipv6hdr),
-              (ntohl(*(u_int32_t *)ih) & 0x0ff00000) >> 20,
+              (ntohl(*(__be32 *)ih) & 0x0ff00000) >> 20,
               ih->hop_limit,
-              (ntohl(*(u_int32_t *)ih) & 0x000fffff));
+              (ntohl(*(__be32 *)ih) & 0x000fffff));
 
        fragment = 0;
        ptr = ip6hoff + sizeof(struct ipv6hdr);
@@ -270,11 +270,15 @@ static void dump_packet(const struct nf_loginfo *info,
                }
                break;
        }
-       case IPPROTO_UDP: {
+       case IPPROTO_UDP:
+       case IPPROTO_UDPLITE: {
                struct udphdr _udph, *uh;
 
-               /* Max length: 10 "PROTO=UDP " */
-               printk("PROTO=UDP ");
+               if (currenthdr == IPPROTO_UDP)
+                       /* Max length: 10 "PROTO=UDP "     */
+                       printk("PROTO=UDP " );
+               else    /* Max length: 14 "PROTO=UDPLITE " */
+                       printk("PROTO=UDPLITE ");
 
                if (fragment)
                        break;
@@ -427,8 +431,7 @@ ip6t_log_target(struct sk_buff **pskb,
                const struct net_device *out,
                unsigned int hooknum,
                const struct xt_target *target,
-               const void *targinfo,
-               void *userinfo)
+               const void *targinfo)
 {
        const struct ip6t_log_info *loginfo = targinfo;
        struct nf_loginfo li;
@@ -437,13 +440,8 @@ ip6t_log_target(struct sk_buff **pskb,
        li.u.log.level = loginfo->level;
        li.u.log.logflags = loginfo->logflags;
 
-       if (loginfo->logflags & IP6T_LOG_NFLOG)
-               nf_log_packet(PF_INET6, hooknum, *pskb, in, out, &li,
-                             "%s", loginfo->prefix);
-       else
-               ip6t_log_packet(PF_INET6, hooknum, *pskb, in, out, &li,
-                               loginfo->prefix);
-
+       ip6t_log_packet(PF_INET6, hooknum, *pskb, in, out, &li,
+                       loginfo->prefix);
        return IP6T_CONTINUE;
 }
 
@@ -452,7 +450,6 @@ static int ip6t_log_checkentry(const char *tablename,
                               const void *entry,
                               const struct xt_target *target,
                               void *targinfo,
-                              unsigned int targinfosize,
                               unsigned int hook_mask)
 {
        const struct ip6t_log_info *loginfo = targinfo;