diff options
author | Ondrej Filip <feela@network.cz> | 2004-07-14 21:46:20 +0000 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2004-07-14 21:46:20 +0000 |
commit | 3b16080c97a2d89c90f7df7a8fda0401ec9abe42 (patch) | |
tree | ef885699eaa72453b99f40dba181112d7e9540b7 /proto/ospf/hello.c | |
parent | a417ad13a117d2458702cbec4aa418ba99981611 (diff) |
Multiple OSPF areas can be attached.
Origination of summary LSA works.
Routing table calculation works.
Virtual links works.
Well, I hope, OSPF is fully compatible with RFC2328!!!!
Diffstat (limited to 'proto/ospf/hello.c')
-rw-r--r-- | proto/ospf/hello.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/proto/ospf/hello.c b/proto/ospf/hello.c index 7820cf74..350bad7c 100644 --- a/proto/ospf/hello.c +++ b/proto/ospf/hello.c @@ -19,12 +19,13 @@ ospf_hello_receive(struct ospf_hello_packet *ps, struct proto *p = (struct proto *) ifa->proto; unsigned int size = ntohs(ps->ospf_packet.length), i, twoway, oldpriority, eligible = 0, peers; - OSPF_TRACE(D_PACKETS, "Received hello from %I via %s", faddr, - ifa->iface->name); + OSPF_TRACE(D_PACKETS, "Received hello from %I via %s%s", faddr, + (ifa->type == OSPF_IT_VLINK ? "vlink-" : ""), ifa->iface->name); mask = ps->netmask; ipa_ntoh(mask); - if ((unsigned) ipa_mklen(mask) != ifa->iface->addr->pxlen) + if ((ifa->type != OSPF_IT_VLINK) && + ((unsigned) ipa_mklen(mask) != ifa->iface->addr->pxlen)) { log(L_ERR "%s%I%sbad netmask %I.", beg, faddr, rec, mask); return; @@ -151,7 +152,7 @@ ospf_hello_receive(struct ospf_hello_packet *ps, ospf_iface_sm(ifa, ISM_NEICH); } - if (ifa->type != OSPF_IT_NBMA) + if (ifa->type == OSPF_IT_NBMA) { if ((ifa->priority == 0) && (n->priority > 0)) ospf_hello_send(NULL, 0, n); @@ -171,7 +172,6 @@ ospf_hello_send(timer * timer, int poll, struct ospf_neighbor *dirn) u32 *pp; int i, send; struct nbma_node *nb; - if (timer == NULL) ifa = dirn->ifa; else @@ -204,6 +204,7 @@ ospf_hello_send(timer * timer, int poll, struct ospf_neighbor *dirn) pkt->netmask = ipa_mkmask(ifa->iface->addr->pxlen); ipa_hton(pkt->netmask); + if (ifa->type == OSPF_IT_VLINK) pkt->netmask = IPA_NONE; pkt->helloint = ntohs(ifa->helloint); pkt->options = ifa->oa->opt.byte; pkt->priority = ifa->priority; @@ -280,5 +281,6 @@ ospf_hello_send(timer * timer, int poll, struct ospf_neighbor *dirn) default: ospf_send_to(ifa->hello_sk, IPA_NONE, ifa); } - OSPF_TRACE(D_PACKETS, "Hello sent via %s", ifa->iface->name); + OSPF_TRACE(D_PACKETS, "Hello sent via %s%s", + (ifa->type == OSPF_IT_VLINK ? "vlink-" : ""), ifa->iface->name); } |