-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
northd: Make sure that affinity flows match on VIP.
Consider the two following LBs: 1) 192.168.0.100:8080 -> 192.168.0.10:80 affinity_timeout=120, skip_snat=true 2) 172.10.0.100:8080 -> 192.168.0.10:80 affinity_timeout=120, skip_snat=false Connected to the same LR with "lb_force_snat_ip" option set. This combination would produce two flows with the same match but different action: 1) priority=150, match=(reg9[6] == 1 && ct.new && ip4 && reg4 == 192.168.0.10 && reg8[0..15] == 80) action=(reg0 = 192.168.0.100; flags.skip_snat_for_lb = 1; ct_lb_mark(backends=192.168.0.10:80; skip_snat);) 2) priority=150, match=(reg9[6] == 1 && ct.new && ip4 && reg4 == 192.168.0.10 && reg8[0..15] == 80) action=(reg0 = 172.10.0.100; flags.force_snat_for_lb = 1; ct_lb_mark(backends=192.168.0.10:80; force_snat);) This causes issues because it's not defined what flow will take priority because they have the same match. So it might happen that it the traffic undergoes SNAT when it shouldn't or vice versa. To make sure that correct action is taken, differentiate the match by adding VIP match (ip.dst == VIP). Fixes: d3926b4 ("northd: rely on new actions for lb affinity") Reported-at: https://issues.redhat.com/browse/FDP-290 Signed-off-by: Ales Musil <amusil@redhat.com> Acked-by: Mark Michelson <mmichels@redhat.com> Signed-off-by: Numan Siddique <numans@ovn.org>
- Loading branch information
1 parent
b0f9a4f
commit dd5cd73
Showing
4 changed files
with
52 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters