What is TCP Self-Connect Issue?

Photo by Thomas Jensen on Unsplash
root@main:~# sysctl net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 32768 60999
while true; do nc -v 127.0.0.1 44600; done

Why do I always pick an even number?

When I run it with an odd number, the program goes into an infinite loop:

root@main:~# ./tcp_self_connect 37391

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store