Skip to content

Commit 7186e11

Browse files
committed
Fix changes
1 parent ee83723 commit 7186e11

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

fpmsyncd/routesync.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ using namespace swss;
2121
#define VRF_PREFIX "Vrf"
2222
#define MGMT_VRF_PREFIX "mgmt"
2323

24-
#define IPV4_DEFAULT_ROUTE "0.0.0.0/0"
25-
#define IPV6_DEFAULT_ROUTE "::/0"
24+
#define IPV4_DEFAULT_GATEWAY "0.0.0.0"
25+
#define IPV6_DEFAULT_GATEWAY "::"
2626

2727
#define NHG_DELIMITER ','
2828

@@ -785,7 +785,7 @@ void RouteSync::onRouteMsg(int nlmsg_type, struct nl_object *obj, char *vrf)
785785
fvVector.push_back(wt);
786786
}
787787

788-
if (!warmRestartInProgress || (fastRestartInProgress && isDefaultRoute(destipprefix)))
788+
if (!warmRestartInProgress || (fastRestartInProgress && isConnectedRoute(gw_list.c_str())))
789789
{
790790
m_routeTable.set(destipprefix, fvVector);
791791
SWSS_LOG_DEBUG("RouteTable set msg: %s %s %s %s", destipprefix,
@@ -809,12 +809,12 @@ void RouteSync::onRouteMsg(int nlmsg_type, struct nl_object *obj, char *vrf)
809809
}
810810

811811
/*
812-
* Check if given string route is IPV4/IPV6 default route
813-
* @arg route route
812+
* Check if given nexthop is default gateway.
813+
* @arg nexthop nexthop address
814814
*/
815-
bool RouteSync::isDefaultRoute(char *route)
815+
bool RouteSync::isConnectedRoute(char *nexthop)
816816
{
817-
return (!strcmp (route, IPV4_DEFAULT_ROUTE)) || (!strcmp (route, IPV6_DEFAULT_ROUTE));
817+
return (!strcmp (route, IPV4_DEFAULT_GATEWAY)) || (!strcmp (route, IPV6_DEFAULT_GATEWAY));
818818
}
819819

820820
/*

fpmsyncd/routesync.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class RouteSync : public NetMsg
8888
/* Get next hop weights*/
8989
string getNextHopWt(struct rtnl_route *route_obj);
9090

91-
bool isDefaultRoute(char *route);
91+
bool isConnectedRoute(char *nexthop);
9292
};
9393

9494
}

warmrestart/warmRestartHelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ bool WarmStartHelper::inProgress(void) const
8686
return (m_enabled && m_state != WarmStart::RECONCILED);
8787
}
8888

89-
bool fastRestartInProgress(void) const
89+
bool WarmStartHelper::fastRestartInProgress(void) const
9090
{
9191
return WarmStart::checkFastReboot();
9292
}

0 commit comments

Comments
 (0)