summaryrefslogtreecommitdiffstats
path: root/proto
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-01-13 14:53:33 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2010-01-13 14:53:33 +0100
commita3062085827db3115961eacd9d945ac202728174 (patch)
tree5e33450dc7114f1cdd163806c4d4e108e3405c91 /proto
parent974363c172e026b00be5f78ec585dda1e402b6f6 (diff)
downloadbird-a3062085827db3115961eacd9d945ac202728174.tar
bird-a3062085827db3115961eacd9d945ac202728174.zip
Comment update.
Diffstat (limited to 'proto')
-rw-r--r--proto/ospf/iface.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c
index 25a9822..b90ab9f 100644
--- a/proto/ospf/iface.c
+++ b/proto/ospf/iface.c
@@ -69,11 +69,14 @@ ospf_open_socket(struct ospf_iface *ifa, int mc)
ipsk->dport = OSPF_PROTO;
#ifdef OSPFv2
- /* FIXME - why there is IPA_NONE on multicast sockets ? */
- if (mc)
- ipsk->saddr = IPA_NONE;
- else
- ipsk->saddr = ifa->iface->addr->ip;
+ /*
+ * In Linux IPv4, binding a raw socket to an IP address of an iface causes
+ * that the socket does not receive multicast packets, as they have
+ * different (multicast) destination IP address.
+ *
+ * We want such filter in the vlink (non-mc) socket.
+ */
+ ipsk->saddr = mc ? IPA_NONE : ifa->iface->addr->ip;
#else /* OSPFv3 */
ipsk->saddr = ifa->lladdr;
#endif