Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cfgmgr/natmgrd] added disabling of NAT feature (Azure#1835) #2088

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cfgmgr/natmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ class NatMgr : public Orch
void removeStaticNatIptables(const std::string port = NONE_STRING);
void removeStaticNaptIptables(const std::string port = NONE_STRING);
void removeDynamicNatRules(const std::string port = NONE_STRING, const std::string ipPrefix = NONE_STRING);
void disableNatFeature(void);

private:
/* Declare APPL_DB, CFG_DB and STATE_DB tables */
Expand Down Expand Up @@ -291,7 +292,6 @@ class NatMgr : public Orch

/* Declare all NAT functionality member functions*/
void enableNatFeature(void);
void disableNatFeature(void);
bool warmBootingInProgress(void);
void flushAllNatEntries(void);
void addAllStaticConntrackEntries(void);
Expand Down
1 change: 1 addition & 0 deletions cfgmgr/natmgrd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ void sigterm_handler(int signo)

natmgr->cleanupMangleIpTables();
natmgr->cleanupPoolIpTable();
natmgr->disableNatFeature();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KonstiantynHalushka Instead of "natmgr->disableNatFeature()", calling "natmgr->setFullConeDnatIptablesRule(DELETE);" would be appropriate.
It will clean up the 1.1.1.1 full-cone rule.

}
}

Expand Down