Commit ba3fbe6
committed
netfilter: nf_conntrack: provide modparam to always register conntrack hooks
The connection tracking hooks can be optionally registered per netns
when conntrack is specifically invoked from the ruleset since
0c66dc1 ("netfilter: conntrack: register hooks in netns when needed
by ruleset"). Then, since 4d3a57f ("netfilter: conntrack: do not
enable connection tracking unless needed"), the default behaviour is
changed to always register them on demand.
This patch provides a toggle that allows users to always register them.
Without this toggle, in order to use conntrack for statistics
collection, you need a dummy rule that refers to conntrack, eg.
iptables -I INPUT -m state --state NEW
This patch allows users to restore the original behaviour via modparam,
ie. always register connection tracking, eg.
modprobe nf_conntrack enable_hooks=1
Hence, no dummy rule is required.
Reported-by: Laura Garcia <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>1 parent 4a60dc7 commit ba3fbe6
1 file changed
+24
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| |||
1075 | 1079 | | |
1076 | 1080 | | |
1077 | 1081 | | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
1078 | 1091 | | |
1079 | 1092 | | |
1080 | 1093 | | |
| |||
1093 | 1106 | | |
1094 | 1107 | | |
1095 | 1108 | | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
1096 | 1115 | | |
1097 | 1116 | | |
| 1117 | + | |
| 1118 | + | |
1098 | 1119 | | |
1099 | 1120 | | |
1100 | 1121 | | |
| |||
1106 | 1127 | | |
1107 | 1128 | | |
1108 | 1129 | | |
1109 | | - | |
1110 | | - | |
1111 | | - | |
1112 | | - | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
1113 | 1133 | | |
1114 | 1134 | | |
1115 | 1135 | | |
| |||
0 commit comments