1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Implements IGP metric comparison for BGP routes.

This commit is contained in:
Ondrej Zajicek
2010-07-31 01:04:32 +02:00
parent ac3ac49a71
commit d1e146f2f8
7 changed files with 82 additions and 11 deletions

View File

@@ -173,6 +173,7 @@ struct hostentry {
struct iface *iface; /* Chosen outgoing interface */
ip_addr gw; /* Chosen next hop */
byte dest; /* Chosen route destination type (RTD_...) */
u32 igp_metric; /* Chosen route IGP metric */
};
typedef struct rte {
@@ -276,6 +277,7 @@ typedef struct rta {
byte flags; /* Route flags (RTF_...), now unused */
byte aflags; /* Attribute cache flags (RTAF_...) */
u16 hash_key; /* Hash over important fields */
u32 igp_metric; /* IGP metric to next hop (for iBGP routes) */
ip_addr gw; /* Next hop */
ip_addr from; /* Advertising router */
struct hostentry *hostentry; /* Hostentry for recursive next-hops */
@@ -311,6 +313,9 @@ typedef struct rta {
#define RTAF_CACHED 1 /* This is a cached rta */
#define IGP_METRIC_UNKNOWN 0x80000000 /* Default igp_metric used when no other
protocol-specific metric is availabe */
/*
* Extended Route Attributes
*/