@@ -1152,18 +1152,23 @@ func (r *DefaultRuleRenderer) StaticBPFModeRawChains(ipVersion uint8,
1152
1152
Action : GotoAction {Target : ChainRawBPFUntrackedPolicy },
1153
1153
Comment : []string {"Jump to target for packets with Bypass mark" },
1154
1154
},
1155
- Rule {
1156
- Match : Match ().DestAddrType (AddrTypeLocal ),
1157
- Action : SetMaskedMarkAction {Mark : tcdefs .MarkSeenSkipFIB , Mask : tcdefs .MarkSeenSkipFIB },
1158
- Comment : []string {"Mark traffic towards the host - it is TRACKed" },
1159
- },
1160
- Rule {
1161
- Match : Match ().NotDestAddrType (AddrTypeLocal ),
1162
- Action : GotoAction {Target : ChainRawUntrackedFlows },
1163
- Comment : []string {"Check if forwarded traffic needs to be TRACKed" },
1164
- },
1165
1155
)
1166
1156
1157
+ if bypassHostConntrack {
1158
+ rawRules = append (rawRules ,
1159
+ Rule {
1160
+ Match : Match ().DestAddrType (AddrTypeLocal ),
1161
+ Action : SetMaskedMarkAction {Mark : tcdefs .MarkSeenSkipFIB , Mask : tcdefs .MarkSeenSkipFIB },
1162
+ Comment : []string {"Mark traffic towards the host - it is TRACKed" },
1163
+ },
1164
+ Rule {
1165
+ Match : Match ().NotDestAddrType (AddrTypeLocal ),
1166
+ Action : GotoAction {Target : ChainRawUntrackedFlows },
1167
+ Comment : []string {"Check if forwarded traffic needs to be TRACKed" },
1168
+ },
1169
+ )
1170
+ }
1171
+
1167
1172
rawPreroutingChain := & Chain {
1168
1173
Name : ChainRawPrerouting ,
1169
1174
Rules : rawRules ,
0 commit comments