参考
https://unix.stackexchange.com/questions/54975/how-to-check-that-a-daemon-is-listening-on-what-interface
On linux, which uses a weak host model, every application listens on every interfaces by default, even when binding a socket to an IP address. The only exception is when binding to 127.0.0.1, which ensures that the application only listens on the lo interface.
问题
当前机器上有一个网卡eth0,一个GRE1隧道,就形成了两个系统内的网口。两个上面都有一个相同的IP。此时如果不SO_BINDTODEVICE特定的一个接口的话,那么创建出来的监听端口是监听在两个接口上。即使设置了socket的SO_REUSEADDR,同时没有设置SO_REUSEPORT,也会导致下一个用相同IP和port的监听socket的创建,比如要在另一个GRE2上创建另一个相同IP、port的socket时候