Fix a copy-paste error in physical_consider_evpn_binding() and
physical_consider_evpn_multicast() configuring evpn local tunnel IP. In
particular we are supposed to copy the data pointed by local_ip pointer
and not the address of the pointer.

Fixes: 33a68819e100 ("controller: Create physical flows based on EVPN 
structures.")
Signed-off-by: Lorenzo Bianconi <[email protected]>
---
 controller/physical.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/controller/physical.c b/controller/physical.c
index 2683f2d97..b9c60c8ab 100644
--- a/controller/physical.c
+++ b/controller/physical.c
@@ -3222,7 +3222,7 @@ physical_consider_evpn_binding(const struct evpn_binding 
*binding,
         ip4 = in6_addr_get_mapped_ipv4(&binding->remote_ip);
         put_load_bytes(&ip4, sizeof ip4, MFF_TUN_DST, 0, 32, ofpacts);
     } else {
-        put_load_bytes(&local_ip, sizeof local_ip, MFF_TUN_IPV6_SRC,
+        put_load_bytes(local_ip, sizeof *local_ip, MFF_TUN_IPV6_SRC,
                        0, 128, ofpacts);
         put_load_bytes(&binding->remote_ip, sizeof binding->remote_ip,
                        MFF_TUN_IPV6_DST, 0, 128, ofpacts);
@@ -3323,7 +3323,7 @@ physical_consider_evpn_multicast(const struct 
evpn_multicast_group *mc_group,
         ovs_be32 ip4 = in6_addr_get_mapped_ipv4(local_ip);
         put_load_bytes(&ip4, sizeof ip4, MFF_TUN_SRC, 0, 32, ofpacts);
     } else {
-        put_load_bytes(&local_ip, sizeof local_ip, MFF_TUN_IPV6_SRC,
+        put_load_bytes(local_ip, sizeof *local_ip, MFF_TUN_IPV6_SRC,
                        0, 128, ofpacts);
     }
     put_load(mc_group->vni, MFF_TUN_ID, 0, 24, ofpacts);
-- 
2.52.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to