mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Use SO_BINDTODEVICE also in Linux/IPv6.
This commit is contained in:
@@ -66,17 +66,7 @@ ospf_sk_open(struct ospf_iface *ifa)
|
||||
sk = sk_new(p->pool);
|
||||
sk->type = SK_IP;
|
||||
sk->dport = OSPF_PROTO;
|
||||
|
||||
#ifdef OSPFv2
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
sk->saddr = IPA_NONE;
|
||||
#else /* OSPFv3 */
|
||||
sk->saddr = ifa->addr->ip; /* link-local addr */
|
||||
#endif
|
||||
|
||||
sk->tos = IP_PREC_INTERNET_CONTROL;
|
||||
sk->rx_hook = ospf_rx_hook;
|
||||
|
||||
Reference in New Issue
Block a user