summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_route.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-12-18 17:19:46 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-12-18 17:19:46 -0800
commit3111ae93268b1af36e469b1f7744e821f27f0a30 (patch)
tree0c6282fe70d9f0df38ec5136a046ce14311c0d42 /ospfd/ospf_route.c
parent0b49f5d475aa5503e60d8dbdc9b4dcc8f6a614ec (diff)
parent177fec0b82d18dc92fe40b51bf1a4a294fb9a7ff (diff)
downloadquagga-3111ae93268b1af36e469b1f7744e821f27f0a30.tar.bz2
quagga-3111ae93268b1af36e469b1f7744e821f27f0a30.tar.xz
Merge branch 'jenner' of suva.vyatta.com:/git/vyatta-quagga into jenner
Diffstat (limited to 'ospfd/ospf_route.c')
-rw-r--r--ospfd/ospf_route.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/ospfd/ospf_route.c b/ospfd/ospf_route.c
index fc372329..edcf4eeb 100644
--- a/ospfd/ospf_route.c
+++ b/ospfd/ospf_route.c
@@ -483,7 +483,8 @@ ospf_intra_add_transit (struct route_table *rt, struct vertex *v,
/* RFC2328 16.1. second stage. */
void
ospf_intra_add_stub (struct route_table *rt, struct router_lsa_link *link,
- struct vertex *v, struct ospf_area *area)
+ struct vertex *v, struct ospf_area *area,
+ int parent_is_root)
{
u_int32_t cost;
struct route_node *rn;
@@ -516,7 +517,20 @@ ospf_intra_add_stub (struct route_table *rt, struct router_lsa_link *link,
if (IS_DEBUG_OSPF_EVENT)
zlog_debug ("ospf_intra_add_stub(): calculated cost is %d + %d = %d",
v->distance, ntohs(link->m[0].metric), cost);
-
+
+ /* PtP links with /32 masks adds host routes to remote, directly
+ * connected hosts, see RFC 2328, 12.4.1.1, Option 1.
+ * Such routes can just be ignored for the sake of tidyness.
+ */
+ if (parent_is_root && link->link_data.s_addr == 0xffffffff &&
+ ospf_if_lookup_by_local_addr (area->ospf, NULL, link->link_id))
+ {
+ if (IS_DEBUG_OSPF_EVENT)
+ zlog_debug ("%s: ignoring host route %s/32 to self.",
+ __func__, inet_ntoa (link->link_id));
+ return;
+ }
+
rn = route_node_get (rt, (struct prefix *) &p);
/* Lookup current routing table. */