Skip to content

Commit

Permalink
[201911] Fixes for NAT lgtm alerts (sonic-net#1391)
Browse files Browse the repository at this point in the history
This PR is similar as sonic-net#1320 which is merged on master branch.

Signed-off-by: Akhilesh Samineni akhilesh.samineni@broadcom.com
  • Loading branch information
AkhileshSamineni authored Dec 16, 2020
1 parent 7f50b98 commit bb1b351
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cfgmgr/natmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4113,7 +4113,7 @@ void NatMgr::setDynamicAllForwardOrAclbasedRules(const string &opCmd, const stri
/* After deletion, set acl_interface to None */
if (opCmd == DELETE)
{
m_natBindingInfo[dynamicKey].acl_interface == NONE_STRING;
m_natBindingInfo[dynamicKey].acl_interface = NONE_STRING;
}
}

Expand Down
8 changes: 8 additions & 0 deletions natsyncd/natsync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ NatSync::NatSync(RedisPipeline *pipelineAppDB, DBConnector *appDb, DBConnector *
}
}

NatSync::~NatSync()
{
if (m_AppRestartAssist)
{
delete m_AppRestartAssist;
}
}

/* To check the port init is done or not */
bool NatSync::isPortInitDone(DBConnector *app_db)
{
Expand Down
1 change: 1 addition & 0 deletions natsyncd/natsync.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class NatSync : public NetMsg
{
public:
NatSync(RedisPipeline *pipelineAppDB, DBConnector *appDb, DBConnector *stateDb, NfNetlink *nfnl);
~NatSync();

virtual void onMsg(int nlmsg_type, struct nl_object *obj);

Expand Down

0 comments on commit bb1b351

Please sign in to comment.