Commit 698614a
committed
kvm: fix security group conntrack NOTRACK optimization triggered by single-direction allow-all rule
The raw-table NOTRACK rules for a VM IP in the cs_notrack/cs_notrack6
ipsets apply to that IP as both source and destination, disabling
connection tracking for it in both directions at once. The check that
populates these ipsets did not look at rule['ruletype'], so an
allow-all rule in only one direction (e.g. egress all to 0.0.0.0/0)
was enough to disable conntrack for the VM, breaking return traffic
when the other direction (e.g. ingress) is restricted.
Only skip conntrack for a family now when both an ingress allow-all
and an egress allow-all rule exist for that family, matching the
actual bidirectional effect of the NOTRACK rules.1 parent c77e16a commit 698614a
1 file changed
Lines changed: 18 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1136 | 1136 | | |
1137 | 1137 | | |
1138 | 1138 | | |
1139 | | - | |
1140 | | - | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
1141 | 1143 | | |
1142 | | - | |
1143 | | - | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
1147 | | - | |
1148 | | - | |
1149 | | - | |
1150 | | - | |
1151 | | - | |
1152 | | - | |
1153 | | - | |
1154 | | - | |
1155 | | - | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
1156 | 1158 | | |
1157 | 1159 | | |
1158 | 1160 | | |
| |||
0 commit comments