diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2009-08-07 10:48:13 +0000 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2010-02-04 01:55:32 +0100 |
commit | bc35a7894f18c3072c1d6d821db9bbbd79c0a9c1 (patch) | |
tree | 6d4fe59a09651d02fcd2f9c7852e187ecdf737ef /ospfd/ospf_lsa.c | |
parent | fd884852db05e35da9eac6ff67fbaa0736d821c6 (diff) | |
download | quagga-bc35a7894f18c3072c1d6d821db9bbbd79c0a9c1.tar.bz2 quagga-bc35a7894f18c3072c1d6d821db9bbbd79c0a9c1.tar.xz |
ospfd: Test for ZEBRA_INTERFACE_UNNUMBERED
In lsa_link_ptop_set() and add ifindex to LSA if set.
Changed to use CHECK_FLAG by David Lamparter.
Cc: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'ospfd/ospf_lsa.c')
-rw-r--r-- | ospfd/ospf_lsa.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index e708d5e2..441b797d 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -531,7 +531,12 @@ 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); } |