]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/netfilter/nfnetlink_log.c
hrtimer: show the timer ranges in /proc/timer_list
[linux-2.6-omap-h63xx.git] / net / netfilter / nfnetlink_log.c
index bf3f19b21fe49eb0399ac66b09940bd085fb17ca..9a35b57ab76d9ea4bc43b4a37401c9c21bd50ee7 100644 (file)
@@ -453,6 +453,14 @@ __build_packet_message(struct nfulnl_instance *inst,
                }
        }
 
+       if (indev && skb_mac_header_was_set(skb)) {
+               NLA_PUT_BE16(inst->skb, NFULA_HWTYPE, htons(skb->dev->type));
+               NLA_PUT_BE16(inst->skb, NFULA_HWLEN,
+                            htons(skb->dev->hard_header_len));
+               NLA_PUT(inst->skb, NFULA_HWHEADER, skb->dev->hard_header_len,
+                       skb_mac_header(skb));
+       }
+
        if (skb->tstamp.tv64) {
                struct nfulnl_msg_packet_timestamp ts;
                struct timeval tv = ktime_to_timeval(skb->tstamp);
@@ -923,9 +931,6 @@ static const struct file_operations nful_file_ops = {
 static int __init nfnetlink_log_init(void)
 {
        int i, status = -ENOMEM;
-#ifdef CONFIG_PROC_FS
-       struct proc_dir_entry *proc_nful;
-#endif
 
        for (i = 0; i < INSTANCE_BUCKETS; i++)
                INIT_HLIST_HEAD(&instance_table[i]);
@@ -943,11 +948,9 @@ static int __init nfnetlink_log_init(void)
        }
 
 #ifdef CONFIG_PROC_FS
-       proc_nful = create_proc_entry("nfnetlink_log", 0440,
-                                     proc_net_netfilter);
-       if (!proc_nful)
+       if (!proc_create("nfnetlink_log", 0440,
+                        proc_net_netfilter, &nful_file_ops))
                goto cleanup_subsys;
-       proc_nful->proc_fops = &nful_file_ops;
 #endif
        return status;