bind INADDR_ANY and IP aliases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[reporting against kernel 2.4.18 and 2.4.20]

Hello,

I noticed a discrepancy in the way bind(INADDR_ANY) treats IP aliases. A UDP
socket bound to INADDR_ANY will receive datagrams sent to any of its
configured IP addresses, regular or aliases. However, when receiving on the
aliased IP, the machine sends out an ICMP "port not reachable" (yet passing
the UDP datagram to the socket). This works if the sending UDP application
ignores ECONNREFUSED (or doesn't get it, for example if not connected). But
I don't want my UDP sender to send if ECONNREFUSED.

Is there a way of working around the problem? I would like to avoid binding
to each interface individually instead of INADDR_ANY.

Any suggestions or insight apreciated!

Thank you,

Serban Simu





-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux