Multicast open socket for (B)DR bugfix.

This commit is contained in:
Ondrej Filip 2000-04-18 19:31:42 +00:00
parent 79f036ef6e
commit 9eea604769

View file

@ -31,8 +31,10 @@ 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->dport=OSPF_PROTO;
ifa->dr_sk->saddr=AllDRouters; ifa->dr_sk->saddr=AllDRouters;
ifa->dr_sk->daddr=AllDRouters; ifa->dr_sk->daddr=AllDRouters;
ifa->dr_sk->tos=IP_PREC_INTERNET_CONTROL; ifa->dr_sk->tos=IP_PREC_INTERNET_CONTROL;
@ -44,7 +46,10 @@ iface_chstate(struct ospf_iface *ifa, u8 state)
ifa->dr_sk->rbsize=ifa->iface->mtu; ifa->dr_sk->rbsize=ifa->iface->mtu;
ifa->dr_sk->tbsize=ifa->iface->mtu; ifa->dr_sk->tbsize=ifa->iface->mtu;
ifa->dr_sk->data=(void *)ifa; ifa->dr_sk->data=(void *)ifa;
sk_open(ifa->dr_sk); if(sk_open(ifa->dr_sk)!=0)
{
DBG("%s: SK_OPEN: new? mc open failed.\n", p->name);
}
} }
} }
else else