Skip to content

Commit

Permalink
iptables: Remove '--nowildcard' from socket match
Browse files Browse the repository at this point in the history
[ upstream commit ca767ee ]

'--no-wildcard' allows the socket match to find zero-bound (listening)
sockets, which we do not want, as this may intercept (reply) traffic
intended for other nodes when an ephemeral source port number
allocated in one node happens to be the same as the allocated proxy
port number in 'this' node (the node doing the iptables socket match
changed here).

Fixes: #12241
Related: #8864
Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
  • Loading branch information
jrajahalme committed Jul 1, 2020
1 parent dc7984d commit 820aa59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/datapath/iptables/iptables.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ func (m *IptablesManager) inboundProxyRedirectRule(cmd string) []string {
return append(m.waitArgs,
"-t", "mangle",
cmd, ciliumPreMangleChain,
"-m", "socket", "--transparent", "--nowildcard",
"-m", "socket", "--transparent",
"-m", "comment", "--comment", "cilium: any->pod redirect proxied traffic to host proxy",
"-j", "MARK",
"--set-mark", toProxyMark)
Expand Down

0 comments on commit 820aa59

Please sign in to comment.