netdev
[Top] [All Lists]

Re: Netfilter compilation patch

To: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
Subject: Re: Netfilter compilation patch
From: Rusty Russell <rusty@xxxxxxxxxxxxxxxx>
Date: Thu, 30 Mar 2000 11:24:05 +0930
Cc: torvalds@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: Your message of "Mon, 27 Mar 2000 19:02:06 +0200." <Pine.LNX.4.05.10003271859550.4493-200000@xxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
In message <Pine.LNX.4.05.10003271859550.4493-200000@xxxxxxxxxxxxxxx> you write
> The ipfwadm_core.c file didn't compile if CONFIG_PROC_FS wasn't selected.

Linus, please apply.

Thanks Arjan.  This is my preferred patch (rather than having those
functions sitting around even though they are never used).

--- net/ipv4/netfilter/ipfwadm_core.c.~1~       Sat Mar 18 05:26:20 2000
+++ net/ipv4/netfilter/ipfwadm_core.c   Thu Mar 30 10:49:35 2000
@@ -1370,12 +1370,14 @@
        if (ret < 0)
                goto cleanup_nothing;
 
+#ifdef CONFIG_PROC_FS
 #ifdef CONFIG_IP_ACCT
        proc_net_create("ip_acct", S_IFREG | S_IRUGO | S_IWUSR, 
ip_acct_procinfo);
 #endif
        proc_net_create("ip_input", S_IFREG | S_IRUGO | S_IWUSR, 
ip_fw_in_procinfo);
        proc_net_create("ip_output", S_IFREG | S_IRUGO | S_IWUSR, 
ip_fw_out_procinfo);
        proc_net_create("ip_forward", S_IFREG | S_IRUGO | S_IWUSR, 
ip_fw_fwd_procinfo);
+#endif /*CONFIG_PROC_FS*/
 
        /* Register for device up/down reports */
        register_netdevice_notifier(&ipfw_dev_notifier);
@@ -1391,12 +1393,14 @@
 #endif
        unregister_netdevice_notifier(&ipfw_dev_notifier);
 
+#ifdef CONFIG_PROC_FS
 #ifdef CONFIG_IP_ACCT
        proc_net_remove("ip_acct");
 #endif
        proc_net_remove("ip_input");
        proc_net_remove("ip_output");
        proc_net_remove("ip_forward");
+#endif /*CONFIG_PROC_FS*/
 
        free_fw_chain(chains[IP_FW_FWD]);
        free_fw_chain(chains[IP_FW_IN]);
--
Hacking time.

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Netfilter compilation patch, Rusty Russell <=