diff options
author | David Lamparter <equinox@diac24.net> | 2010-02-04 02:24:09 +0100 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2010-02-04 02:24:09 +0100 |
commit | 77f990188b526ea9ad3521980aee1d6faca8bb57 (patch) | |
tree | c4cce46d78f9c5d7ba7060a66682222966a656f2 /ospfd/ospf_lsa.c | |
parent | 8f8f4dec2e41b217a0651a2f33112447ae04f73b (diff) | |
parent | 472870f49a5c1eb18bfd30f1b06c1bff08ecd233 (diff) | |
download | quagga-77f990188b526ea9ad3521980aee1d6faca8bb57.tar.bz2 quagga-77f990188b526ea9ad3521980aee1d6faca8bb57.tar.xz |
Merge branch 'patches/jt_unnumbered' into ospf-merge-3
Conflicts:
ospfd/ospfd.c
Diffstat (limited to 'ospfd/ospf_lsa.c')
-rw-r--r-- | ospfd/ospf_lsa.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index c9f2cba3..6dd1d341 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -527,9 +527,16 @@ lsa_link_ptop_set (struct stream *s, struct ospf_interface *oi) { /* For unnumbered point-to-point networks, the Link Data field should specify the interface's MIB-II ifIndex value. */ - links += link_info_set (s, nbr->router_id, oi->address->u.prefix4, + if (CHECK_FLAG(oi->ifp->status, ZEBRA_INTERFACE_UNNUMBERED)) + id.s_addr = htonl(oi->ifp->ifindex); + else + id = oi->address->u.prefix4; + + links += link_info_set (s, nbr->router_id, id, LSA_LINK_TYPE_POINTOPOINT, 0, cost); } + if (CHECK_FLAG(oi->ifp->status, ZEBRA_INTERFACE_UNNUMBERED)) + return links; /* Regardless of the state of the neighboring router, we must add a Type 3 link (stub network). @@ -655,7 +662,7 @@ router_lsa_link_set (struct stream *s, struct ospf_area *area) struct in_addr host_mask = {~0}; /* All ones */ struct listnode *node; struct ospf_interface *oi; - int links = 0; + int links = 0, old_links; for (ALL_LIST_ELEMENTS_RO (area->oiflist, node, oi)) { @@ -666,6 +673,7 @@ router_lsa_link_set (struct stream *s, struct ospf_area *area) { if (oi->state != ISM_Down) { + old_links = links; /* Describe each link. */ switch (oi->type) { @@ -687,6 +695,7 @@ router_lsa_link_set (struct stream *s, struct ospf_area *area) case OSPF_IFTYPE_LOOPBACK: links += lsa_link_loopback_set (s, oi); } + ospf_lsa_pos_set(old_links, links, oi); } } } |