1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Implements protocol-specific Router ID for OSPF.

And fixes one minor bug.
This commit is contained in:
Ondrej Zajicek
2009-12-11 01:20:53 +01:00
parent be2d38b7e9
commit 8a70a13e7e
10 changed files with 48 additions and 59 deletions

View File

@@ -13,8 +13,9 @@
void
ospf_pkt_fill_hdr(struct ospf_iface *ifa, void *buf, u8 h_type)
{
struct proto_ospf *po = ifa->oa->po;
struct proto *p = &po->proto;
struct ospf_packet *pkt;
struct proto *p = (struct proto *) (ifa->oa->po);
pkt = (struct ospf_packet *) buf;
@@ -22,7 +23,7 @@ ospf_pkt_fill_hdr(struct ospf_iface *ifa, void *buf, u8 h_type)
pkt->type = h_type;
pkt->routerid = htonl(p->cf->global->router_id);
pkt->routerid = htonl(po->router_id);
pkt->areaid = htonl(ifa->oa->areaid);
#ifdef OSPFv3
@@ -345,7 +346,7 @@ ospf_rx_hook(sock * sk, int size)
}
#endif
if (ntohl(ps->routerid) == p->cf->global->router_id)
if (ntohl(ps->routerid) == po->router_id)
{
log(L_ERR "%s%I - received my own router ID!", mesg, sk->faddr);
return 1;