]> err.no Git - linux-2.6/blobdiff - net/ipv4/tcp_probe.c
netfilter: Fix SIP conntrack build with NAT disabled.
[linux-2.6] / net / ipv4 / tcp_probe.c
index f37d5928921ad3f156465836f275c38595b9dfbb..1c509592574a79d6ee53a6104e8cfe6466058a5c 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/module.h>
 #include <linux/ktime.h>
 #include <linux/time.h>
+#include <net/net_namespace.h>
 
 #include <net/tcp.h>
 
@@ -130,7 +131,7 @@ static struct jprobe tcp_jprobe = {
        .kp = {
                .symbol_name    = "tcp_rcv_established",
        },
-       .entry  = JPROBE_ENTRY(jtcp_rcv_established),
+       .entry  = jtcp_rcv_established,
 };
 
 static int tcpprobe_open(struct inode * inode, struct file * file)
@@ -152,7 +153,7 @@ static int tcpprobe_sprint(char *tbuf, int n)
                = ktime_to_timespec(ktime_sub(p->tstamp, tcp_probe.start));
 
        return snprintf(tbuf, n,
-                       "%lu.%09lu %d.%d.%d.%d:%u %d.%d.%d.%d:%u"
+                       "%lu.%09lu " NIPQUAD_FMT ":%u " NIPQUAD_FMT ":%u"
                        " %d %#x %#x %u %u %u %u\n",
                        (unsigned long) tv.tv_sec,
                        (unsigned long) tv.tv_nsec,
@@ -228,7 +229,7 @@ static __init int tcpprobe_init(void)
        if (!tcp_probe.log)
                goto err0;
 
-       if (!proc_net_fops_create(procname, S_IRUSR, &tcpprobe_fops))
+       if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &tcpprobe_fops))
                goto err0;
 
        ret = register_jprobe(&tcp_jprobe);
@@ -238,7 +239,7 @@ static __init int tcpprobe_init(void)
        pr_info("TCP probe registered (port=%d)\n", port);
        return 0;
  err1:
-       proc_net_remove(procname);
+       proc_net_remove(&init_net, procname);
  err0:
        kfree(tcp_probe.log);
        return ret;
@@ -247,7 +248,7 @@ module_init(tcpprobe_init);
 
 static __exit void tcpprobe_exit(void)
 {
-       proc_net_remove(procname);
+       proc_net_remove(&init_net, procname);
        unregister_jprobe(&tcp_jprobe);
        kfree(tcp_probe.log);
 }