summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_route.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-10-13 12:12:33 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-10-13 12:12:33 -0700
commitd3e384e4f00aa90db4310f82f3cbe6528e256334 (patch)
tree716c9dfa64dd9fdc4b05b377a2a19b7b216c4856 /ospfd/ospf_route.c
parentd0cee3d3d7267f8f5c1d1ffd5c5fd8802a9db987 (diff)
parent41dc3488cf127a1e23333459a0c316ded67f7ff3 (diff)
downloadquagga-d3e384e4f00aa90db4310f82f3cbe6528e256334.tar.bz2
quagga-d3e384e4f00aa90db4310f82f3cbe6528e256334.tar.xz
Merge branch 'master' of /home/shemminger/src/quagga into upstream
Resolve all conflicts by using upstream version.
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 3a1fa999..50fba750 100644
--- a/ospfd/ospf_route.c
+++ b/ospfd/ospf_route.c
@@ -481,7 +481,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;
@@ -514,7 +515,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. */