Skip to content

Commit a6f71c6

Browse files
committed
Disable TCP early demux when pod-eni is enabled
1 parent 91ce9f5 commit a6f71c6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/init.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ HOST_IP=$(curl -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/late
2828
PRIMARY_IF=$(ip -4 -o a | grep "$HOST_IP" | awk '{print $2}')
2929
sysctl -w "net.ipv4.conf.$PRIMARY_IF.rp_filter=2"
3030

31+
# Configure tcp_early_demux to enable kubelet to pod-eni communication
32+
# https://lwn.net/Articles/503420/ for background
33+
if ! [[ -z "$ENABLE_POD_ENI" ]]; then
34+
sysctl -w "net.ipv4.tcp_early_demux=0"
35+
fi
36+
3137
cat "/proc/sys/net/ipv4/conf/$PRIMARY_IF/rp_filter"
3238

3339
echo "CNI init container done"

0 commit comments

Comments
 (0)