From 3b89a2327ba385abf2a8321a5a900faba3765612 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Wed, 21 Apr 2010 21:50:38 +0200 Subject: Fixes several problems in OSPF vlink implementation. --- proto/ospf/rt.h | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'proto/ospf/rt.h') diff --git a/proto/ospf/rt.h b/proto/ospf/rt.h index 559fa5c..6b23bff 100644 --- a/proto/ospf/rt.h +++ b/proto/ospf/rt.h @@ -17,22 +17,31 @@ typedef struct orta { int type; - u32 options; - /* router-LSA style options (for ORT_ROUTER), with V,E,B bits. - In OSPFv2, ASBRs from another areas (that we know from rt-summary-lsa), - have just ORTA_ASBR in options, their real options are unknown */ + u32 options; + /* + * For ORT_ROUTER routes, options field are router-LSA style + * options, with V,E,B bits. In OSPFv2, ASBRs from another areas + * (that we know from rt-summary-lsa) have just ORTA_ASBR in + * options, their real options are unknown. + */ #define ORTA_ASBR OPT_RT_E #define ORTA_ABR OPT_RT_B - struct ospf_area *oa; + /* + * For ORT_NET routes, the field is almost unused with one + * exception: ORTA_PREF for external routes means that the route is + * preferred in AS external route selection according to 16.4.1. - + * it is intra-area path using non-backbone area. In other words, + * the forwarding address (or ASBR if forwarding address is zero) is + * intra-area (type == RTS_OSPF) and its area is not a backbone. + */ +#define ORTA_PREF 0x80000000 u32 metric1; u32 metric2; - ip_addr nh; /* Next hop */ - struct ospf_iface *ifa; /* Outgoing interface */ - struct top_hash_entry *ar; /* Advertising router (or ABR) */ u32 tag; u32 rid; /* Router ID of real advertising router */ - /* For ext-LSA from different area, 'ar' is a type 1 LSA of ABR. - Router ID of real advertising router is stored in 'rid'. */ + struct ospf_area *oa; + struct ospf_iface *ifa; /* Outgoing interface */ + ip_addr nh; /* Next hop */ } orta; @@ -41,7 +50,6 @@ typedef struct ort struct fib_node fn; orta n; orta o; - struct ort *efn; /* For RFC1583 */ } ort; -- cgit v1.2.3