@@ -1189,7 +1189,7 @@ bool VNetRouteOrch::doRouteTask<VNetVrfObject>(const string& vnet, IpPrefix& ipP
11891189 auto prefixToRemove = ipPrefix;
11901190 if (adv_prefix.to_string () != ipPrefix.to_string ())
11911191 {
1192- prefixToRemove = adv_prefix;
1192+ prefixToRemove = adv_prefix;
11931193 }
11941194 auto prefixSubnet = prefixToRemove.getSubnet ();
11951195 if (gRouteOrch && gRouteOrch ->isRouteExists (prefixSubnet))
@@ -2433,7 +2433,7 @@ void VNetRouteOrch::updateVnetTunnel(const BfdUpdate& update)
24332433 continue ;
24342434 }
24352435 // when we add the first nexthop to the route, we dont create a nexthop group, we call the updateTunnelRoute with NHG with one member.
2436- // when adding the 2nd, 3rd ... members we create each NH using this create_next_hop_group_member call but give it the reference of next_hop_group_id.
2436+ // when adding the 2nd, 3rd ... members we create each NH using this create_next_hop_group_member call but give it the reference of next_hop_group_id.
24372437 // this way we dont have to update the route, the syncd does it by itself. we only call the updateTunnelRoute to add/remove when adding or removing the
24382438 // route fully.
24392439
@@ -2511,7 +2511,7 @@ void VNetRouteOrch::updateVnetTunnel(const BfdUpdate& update)
25112511 SWSS_LOG_INFO (" Successfully removed existing bgp route for prefix: %s\n " , prefixStr.c_str ());
25122512 }
25132513 string op = SET_COMMAND;
2514- SWSS_LOG_INFO (" Adding Vnet route for prefix:%s with nexthop group: %s\n " , prefixStr.c_str (), nhStr.c_str ());
2514+ SWSS_LOG_INFO (" Adding Vnet route for prefix:%s with nexthop group: %s\n " , prefixStr.c_str (), nhStr.c_str ());
25152515
25162516 if (!updateTunnelRoute (vnet, ip_pfx, nexthops, op))
25172517 {
@@ -2520,7 +2520,7 @@ void VNetRouteOrch::updateVnetTunnel(const BfdUpdate& update)
25202520 }
25212521 else
25222522 {
2523- SWSS_LOG_INFO (" Successfully created tunnel route in hardware for prefix: %s\n " , prefixStr.c_str ());
2523+ SWSS_LOG_INFO (" Successfully created tunnel route in hardware for prefix: %s\n " , prefixStr.c_str ());
25242524 }
25252525 }
25262526 }
@@ -2574,7 +2574,7 @@ void VNetRouteOrch::updateVnetTunnel(const BfdUpdate& update)
25742574 {
25752575 for (auto ip_pfx : syncd_nexthop_groups_[vnet][nexthops].tunnel_routes )
25762576 {
2577- SWSS_LOG_NOTICE (" Removing Vnet route for prefix : %s due to no active nexthops.\n " ,ip_pfx.to_string ().c_str ());
2577+ SWSS_LOG_NOTICE (" Removing Vnet route for prefix : %s due to no active nexthops.\n " ,ip_pfx.to_string ().c_str ());
25782578 string op = DEL_COMMAND;
25792579 updateTunnelRoute (vnet, ip_pfx, nexthops, op);
25802580 }
@@ -2651,7 +2651,7 @@ void VNetRouteOrch::updateVnetTunnelCustomMonitor(const MonitorUpdate& update)
26512651 NextHopGroupKey nhg_custom_primary = getActiveNHSet ( vnet, primary, prefix);
26522652 NextHopGroupKey nhg_custom_secondary = getActiveNHSet ( vnet, secondary, prefix);
26532653 SWSS_LOG_INFO (" Primary active(%s), Secondary active (%s), Current active(%s)\n " , nhg_custom_primary.to_string ().c_str (),
2654- nhg_custom_secondary.to_string ().c_str (), active_nhg.to_string ().c_str ());
2654+ nhg_custom_secondary.to_string ().c_str (), active_nhg.to_string ().c_str ());
26552655 if (nhg_custom_primary.getSize () > 0 )
26562656 {
26572657 if (nhg_custom_primary != active_nhg )
@@ -2731,14 +2731,14 @@ void VNetRouteOrch::updateVnetTunnelCustomMonitor(const MonitorUpdate& update)
27312731 {
27322732 // we need to replace the nhg in the route
27332733 SWSS_LOG_INFO (" Replacing nexthop group for prefix: %s, nexthop group: %s\n " ,
2734- prefix.to_string ().c_str (), nhg_custom.to_string ().c_str ());
2734+ prefix.to_string ().c_str (), nhg_custom.to_string ().c_str ());
27352735 route_status = update_route (vr_id, pfx, nh_id);
27362736 }
27372737 else
27382738 {
27392739 // we need to readd the route.
27402740 SWSS_LOG_NOTICE (" Adding Custom monitored Route with prefix: %s and nexthop group: %s\n " ,
2741- prefix.to_string ().c_str (), nhg_custom.to_string ().c_str ());
2741+ prefix.to_string ().c_str (), nhg_custom.to_string ().c_str ());
27422742 auto prefixToUse = prefix;
27432743 if (prefix_to_adv_prefix_.find (prefix) != prefix_to_adv_prefix_.end ())
27442744 {
@@ -2817,7 +2817,7 @@ void VNetRouteOrch::updateVnetTunnelCustomMonitor(const MonitorUpdate& update)
28172817 if (nhg_custom.getSize () == 0 && active_nhg_size > 0 )
28182818 {
28192819 vrf_obj->removeRoute (prefix);
2820- SWSS_LOG_NOTICE (" Route prefix is no longer active: %s\n " , prefix.to_string ().c_str ());
2820+ SWSS_LOG_NOTICE (" Route prefix is no longer active: %s\n " , prefix.to_string ().c_str ());
28212821 removeRouteState (vnet, prefix);
28222822 if (prefix_to_adv_prefix_.find (prefix) != prefix_to_adv_prefix_.end ())
28232823 {
@@ -2995,7 +2995,6 @@ bool VNetRouteOrch::handleTunnel(const Request& request)
29952995 IpAddress ip = ip_list[idx_ip];
29962996 bool is_local = isLocalEndpoint (vnet_name, ip);
29972997 bool is_overlay = !is_local;
2998- IpAddress nh_ip = is_local ? monitor_list[idx_ip] : ip;
29992998 string alias = is_local ? gIntfsOrch ->getRouterIntfsAlias (ip) : " " ;
30002999 MacAddress mac;
30013000 uint32_t vni = 0 ;
@@ -3015,7 +3014,8 @@ bool VNetRouteOrch::handleTunnel(const Request& request)
30153014
30163015 if (is_local)
30173016 {
3018- vnet_tunnel_term_acl_->createAclRule (vnet_name, ip_pfx, nh_ip);
3017+ SWSS_LOG_INFO (" Attempting to add TUNNEL TERM ACL for local endpoint %s" , ip.to_string ().c_str ());
3018+ vnet_tunnel_term_acl_->createAclRule (vnet_name, ip_pfx, ip);
30193019 }
30203020
30213021 NextHopKey nh (ip, alias, mac, vni, is_overlay);
@@ -3337,6 +3337,7 @@ bool VNetTunnelTermAcl::createAclRule(const string vnet_name, swss::IpPrefix& vi
33373337 if (getAclRule (vnet_name, vip, rule))
33383338 {
33393339 /* If there are more than one local points for the same VIP, we will not create a new rule. */
3340+ SWSS_LOG_NOTICE (" ACL rule already exists for VNet %s with VIP %s" , vnet_name.c_str (), vip.to_string ().c_str ());
33403341 return true ;
33413342 }
33423343
@@ -3352,10 +3353,14 @@ bool VNetTunnelTermAcl::createAclRule(const string vnet_name, swss::IpPrefix& vi
33523353 vector<FieldValueTuple> fvs = {
33533354 {RULE_PRIORITY, to_string (VNET_TUNNEL_TERM_ACL_BASE_PRIORITY)},
33543355 {MATCH_DST_IP, vip.to_string ()},
3356+ {MATCH_TUNNEL_TERM, " true" },
33553357 /* This tunnel term acl is to handle a transient state in DPU failover, so the redirect can't point to a VIP.*/
3356- {ACTION_REDIRECT_ACTION, alias }
3358+ {ACTION_REDIRECT_ACTION, nh_ip. to_string () }
33573359 };
33583360
3361+ SWSS_LOG_NOTICE (" Creating ACL rule %s for VNet %s with VIP %s to redirect to %s" ,
3362+ rule_name.c_str (), vnet_name.c_str (), vip.to_string ().c_str (), nh_ip.to_string ().c_str ());
3363+
33593364 acl_rule_table_->set (rule_name, fvs);
33603365
33613366 rule.rule_name = rule_name;
0 commit comments