[ovs-dev] [PATCH, v2] ovn: Allow SNAT traffic destined to router ip
Chandra S Vejendla
csvejend at us.ibm.com
Mon Jul 18 12:22:47 UTC 2016
When router ip is used as SNAT IP, traffic destined to router
ip should not be dropped
---
ovn/northd/ovn-northd.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index 7ce509d..78c3a7d 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -2399,11 +2399,16 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
ds_put_cstr(&match, "ip4.dst == {");
bool has_drop_ips = false;
for (int i = 0; i < op->lrp_networks.n_ipv4_addrs; i++) {
+ bool nat_ip_is_router_ip = false;
for (int j = 0; j < n_nat_ips; j++) {
if (op->lrp_networks.ipv4_addrs[i].addr == nat_ips[j]) {
- continue;
+ nat_ip_is_router_ip = true;
+ break;
}
}
+ if (nat_ip_is_router_ip) {
+ continue;
+ }
ds_put_format(&match, "%s, ",
op->lrp_networks.ipv4_addrs[i].addr_s);
has_drop_ips = true;
--
2.6.1
More information about the dev
mailing list