Giter Club home page Giter Club logo

Comments (1)

danieldin95 avatar danieldin95 commented on August 19, 2024

So we guess the mac binding not be learn for 172.16.10.27, and when we add a mac binding via ovn-sbctl, like this:

()[root@ovn-tool-0 /]# ovn-sbctl create mac_binding  datapath=675eac5c-b01b-4ea8-b425-03570cff0c7e logical_port=lrp-43215760-af0b-480b-8f7d-a6d80de4f8e2 ip="172.16.10.27" mac="fa\:16\:3e\:26\:3b\:a7"
7d135ef1-8750-4df9-937d-8c035df9b8aa
()[root@ovn-tool-0 /]#

The curl 172.16.10.23 is working. This maybe a bug from our above case. And when I to view code in northd.c, I may find a reason to fix it, but I ot sure why? anyone can help me to fix it?.

diff --git a/northd/northd.c b/northd/northd.c
index 08c262532..6b4e7422a 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -7140,6 +7140,9 @@ build_lswitch_rport_arp_req_flows(struct ovn_port *op,
         }
     }

+    struct sset snat_ips_v4 = SSET_INITIALIZER(&snat_ips_v4);
+    struct sset snat_ips_v6 = SSET_INITIALIZER(&snat_ips_v6);
+
     for (size_t i = 0; i < op->od->nbr->n_nat; i++) {
         struct ovn_nat *nat_entry = &op->od->nat_entries[i];
         const struct nbrec_nat *nat = nat_entry->nb;
@@ -7149,7 +7152,17 @@ build_lswitch_rport_arp_req_flows(struct ovn_port *op,
         }

         if (!strcmp(nat->type, "snat")) {
-            continue;
+            if (nat_entry_is_v6(nat_entry)) {
+                if (sset_contains(&snat_ips_v6, nat->external_ip)) {
+                    continue;
+                }
+                sset_add(&snat_ips_v6, nat->external_ip);
+            } else {
+                if (sset_contains(&snat_ips_v4, nat->external_ip)) {
+                    continue;
+                }
+                sset_add(&snat_ips_v4, nat->external_ip);
+            }
         }

from ovn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.