mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Multicast open socket for (B)DR bugfix.
This commit is contained in:
parent
79f036ef6e
commit
9eea604769
@ -31,20 +31,25 @@ iface_chstate(struct ospf_iface *ifa, u8 state)
|
|||||||
{
|
{
|
||||||
if(ifa->dr_sk==NULL)
|
if(ifa->dr_sk==NULL)
|
||||||
{
|
{
|
||||||
|
DBG("%s: Adding new multicast socket for (B)DR\n", p->name);
|
||||||
ifa->dr_sk=sk_new(p->pool);
|
ifa->dr_sk=sk_new(p->pool);
|
||||||
ifa->dr_sk->type=SK_IP_MC;
|
ifa->dr_sk->type=SK_IP_MC;
|
||||||
ifa->dr_sk->saddr=AllDRouters;
|
ifa->dr_sk->dport=OSPF_PROTO;
|
||||||
ifa->dr_sk->daddr=AllDRouters;
|
ifa->dr_sk->saddr=AllDRouters;
|
||||||
ifa->dr_sk->tos=IP_PREC_INTERNET_CONTROL;
|
ifa->dr_sk->daddr=AllDRouters;
|
||||||
ifa->dr_sk->ttl=1;
|
ifa->dr_sk->tos=IP_PREC_INTERNET_CONTROL;
|
||||||
ifa->dr_sk->rx_hook=ospf_rx_hook;
|
ifa->dr_sk->ttl=1;
|
||||||
ifa->dr_sk->tx_hook=ospf_tx_hook;
|
ifa->dr_sk->rx_hook=ospf_rx_hook;
|
||||||
ifa->dr_sk->err_hook=ospf_err_hook;
|
ifa->dr_sk->tx_hook=ospf_tx_hook;
|
||||||
ifa->dr_sk->iface=ifa->iface;
|
ifa->dr_sk->err_hook=ospf_err_hook;
|
||||||
ifa->dr_sk->rbsize=ifa->iface->mtu;
|
ifa->dr_sk->iface=ifa->iface;
|
||||||
ifa->dr_sk->tbsize=ifa->iface->mtu;
|
ifa->dr_sk->rbsize=ifa->iface->mtu;
|
||||||
ifa->dr_sk->data=(void *)ifa;
|
ifa->dr_sk->tbsize=ifa->iface->mtu;
|
||||||
sk_open(ifa->dr_sk);
|
ifa->dr_sk->data=(void *)ifa;
|
||||||
|
if(sk_open(ifa->dr_sk)!=0)
|
||||||
|
{
|
||||||
|
DBG("%s: SK_OPEN: new? mc open failed.\n", p->name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -52,7 +57,7 @@ iface_chstate(struct ospf_iface *ifa, u8 state)
|
|||||||
if(ifa->dr_sk!=NULL)
|
if(ifa->dr_sk!=NULL)
|
||||||
{
|
{
|
||||||
sk_close(ifa->dr_sk);
|
sk_close(ifa->dr_sk);
|
||||||
rfree(ifa->dr_sk);
|
rfree(ifa->dr_sk);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user