Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
ec5699e4
Commit
ec5699e4
authored
Aug 15, 2016
by
Minhan Xia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up oldIptablesMasqueradeMark
parent
a6d37f7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
32 deletions
+0
-32
proxier.go
pkg/proxy/iptables/proxier.go
+0
-32
No files found.
pkg/proxy/iptables/proxier.go
View file @
ec5699e4
...
...
@@ -67,10 +67,6 @@ const (
// the mark-for-masquerade chain
KubeMarkMasqChain
utiliptables
.
Chain
=
"KUBE-MARK-MASQ"
// the mark we apply to traffic needing SNAT
// TODO(thockin): Remove this for v1.3 or v1.4.
oldIptablesMasqueradeMark
=
"0x4d415351"
// the mark-for-drop chain
KubeMarkDropChain
utiliptables
.
Chain
=
"KUBE-MARK-DROP"
)
...
...
@@ -317,21 +313,6 @@ func CleanupLeftovers(ipt utiliptables.Interface) (encounteredError bool) {
encounteredError
=
true
}
}
// Clean up the older SNAT rule which was directly in POSTROUTING.
// TODO(thockin): Remove this for v1.3 or v1.4.
args
=
[]
string
{
"-m"
,
"comment"
,
"--comment"
,
"kubernetes service traffic requiring SNAT"
,
"-m"
,
"mark"
,
"--mark"
,
oldIptablesMasqueradeMark
,
"-j"
,
"MASQUERADE"
,
}
if
err
:=
ipt
.
DeleteRule
(
utiliptables
.
TableNAT
,
utiliptables
.
ChainPostrouting
,
args
...
);
err
!=
nil
{
if
!
utiliptables
.
IsNotFoundError
(
err
)
{
glog
.
Errorf
(
"Error removing old-style SNAT rule: %v"
,
err
)
encounteredError
=
true
}
}
return
encounteredError
}
...
...
@@ -1101,19 +1082,6 @@ func (proxier *Proxier) syncProxyRules() {
}
}
proxier
.
portsMap
=
replacementPortsMap
// Clean up the older SNAT rule which was directly in POSTROUTING.
// TODO(thockin): Remove this for v1.3 or v1.4.
args
:=
[]
string
{
"-m"
,
"comment"
,
"--comment"
,
"kubernetes service traffic requiring SNAT"
,
"-m"
,
"mark"
,
"--mark"
,
oldIptablesMasqueradeMark
,
"-j"
,
"MASQUERADE"
,
}
if
err
:=
proxier
.
iptables
.
DeleteRule
(
utiliptables
.
TableNAT
,
utiliptables
.
ChainPostrouting
,
args
...
);
err
!=
nil
{
if
!
utiliptables
.
IsNotFoundError
(
err
)
{
glog
.
Errorf
(
"Error removing old-style SNAT rule: %v"
,
err
)
}
}
}
// Join all words with spaces, terminate with newline and write to buf.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment