diff options
author | Martin Mares <mj@ucw.cz> | 2000-04-28 15:13:29 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-04-28 15:13:29 +0000 |
commit | cea636640005c9ee9b628ce07a2d467c132941fe (patch) | |
tree | 5ceba7f7ad159ce62efaafe5457eba2b712cb53f /proto/bgp/attrs.c | |
parent | a412f01ea84709b9af0113acc5aa2ce3dad1d292 (diff) |
The `bgp_origin' attribute is now an enum.
Diffstat (limited to 'proto/bgp/attrs.c')
-rw-r--r-- | proto/bgp/attrs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index 90da497e..4136049c 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -490,9 +490,9 @@ bgp_create_attrs(struct bgp_proto *p, rte *e, ea_list **attrs, struct linpool *p a->flags = BAF_TRANSITIVE; a->type = EAF_TYPE_INT; if (rta->source == RTS_RIP_EXT || rta->source == RTS_OSPF_EXT) - a->u.data = 2; /* Incomplete */ + a->u.data = ORIGIN_INCOMPLETE; else - a->u.data = 0; /* IGP */ + a->u.data = ORIGIN_IGP; a++; a->id = EA_CODE(EAP_BGP, BA_AS_PATH); @@ -638,8 +638,8 @@ bgp_rte_better(rte *new, rte *old) /* Use origins */ x = ea_find(new->attrs->eattrs, EA_CODE(EAP_BGP, BA_ORIGIN)); y = ea_find(old->attrs->eattrs, EA_CODE(EAP_BGP, BA_ORIGIN)); - n = x ? x->u.data : 2; - o = y ? y->u.data : 2; + n = x ? x->u.data : ORIGIN_INCOMPLETE; + o = y ? y->u.data : ORIGIN_INCOMPLETE; if (n < o) return 1; if (n > o) |