/proc and/or /sys file to know if ip_tables is there?
Hi,
I need to know reliably at runtime whether or not ip_tables is either currently loaded as a module or built-in the kernel.
Testing for /sys/module/ip_tables solves the first issue, but in case of built-in it's not usable.
I could check for ip_tables_* symbols in /proc/kallsyms but I guess it's not a nice way.
Any other proper way?
Tomasz
Quoted 5 lines · Tomasz Bursztyka
Hi,
I need to know reliably at runtime whether or not
ip_tablesis either currently loaded as a module or built-in the kernel.
Quoted 7 lines
Testing for
/sys/module/ip_tablessolves the first issue, but in case of built-in it's not usable.I could check for ip_tables_* symbols in
/proc/kallsymsbut I guess it's not a nice way.Any other proper way?
[ -f /proc/net/ip_tables_names ]
Although built in components will show up in /sys/module/ also.
Phil
Hi Phil,
Quoted 1 line
Although built in components will show up in/sys/module/ also.
I was expecting something like that, but making as built-in only ip_tables module did not. I guess I need to add other stuff too.
Thanks,
Tomasz