diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2009-01-13 21:35:17 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2009-01-13 21:35:17 +0000 |
commit | 93f375ac85dd9ae681b8a2e32bb000af303dcdf1 (patch) | |
tree | 455b34818e955dd54bd6c935d8435aaaa44eb0d5 /usr.sbin | |
parent | 6963561e5fdb7f53addcab13192448109561f3e1 (diff) |
Replace NEW_ASPATH/NEW_AGGREGATOR with the naming from RFC4893,
AS4_PATH/AS4_AGGREGATOR. No binary change.
ok claudio
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/rde.c | 18 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde.h | 8 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde_attr.c | 4 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde_update.c | 6 |
4 files changed, 18 insertions, 18 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 579cdb3bc55..ed6fa34ed35 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.234 2008/12/28 15:19:21 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.235 2009/01/13 21:35:16 sthen Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -795,7 +795,7 @@ rde_update_dispatch(struct imsg *imsg) } /* - * if either ATTR_NEW_AGGREGATOR or ATTR_NEW_ASPATH is present + * if either ATTR_AS4_AGGREGATOR or ATTR_AS4_PATH is present * try to fixup the attributes. * XXX do not fixup if F_ATTR_LOOP is set. */ @@ -1336,7 +1336,7 @@ bad_flags: mpa->unreach_len = attr_len; plen += attr_len; break; - case ATTR_NEW_AGGREGATOR: + case ATTR_AS4_AGGREGATOR: if (attr_len != 8) goto bad_len; if (!CHECK_FLAGS(flags, ATTR_OPTIONAL|ATTR_TRANSITIVE, @@ -1344,7 +1344,7 @@ bad_flags: goto bad_flags; a->flags |= F_ATTR_AS4BYTE_NEW; goto optattr; - case ATTR_NEW_ASPATH: + case ATTR_AS4_PATH: if (!CHECK_FLAGS(flags, ATTR_OPTIONAL|ATTR_TRANSITIVE, ATTR_PARTIAL)) goto bad_flags; @@ -1585,8 +1585,8 @@ rde_as4byte_fixup(struct rde_peer *peer, struct rde_aspath *a) u_int32_t as; /* first get the attributes */ - nasp = attr_optget(a, ATTR_NEW_ASPATH); - naggr = attr_optget(a, ATTR_NEW_AGGREGATOR); + nasp = attr_optget(a, ATTR_AS4_PATH); + naggr = attr_optget(a, ATTR_AS4_AGGREGATOR); if (rde_as4byte(peer)) { /* NEW session using 4-byte ASNs */ @@ -1601,7 +1601,7 @@ rde_as4byte_fixup(struct rde_peer *peer, struct rde_aspath *a) if ((oaggr = attr_optget(a, ATTR_AGGREGATOR))) { memcpy(&as, oaggr->data, sizeof(as)); if (ntohl(as) != AS_TRANS) { - /* per RFC draft ignore NEW_ASPATH and NEW_AGGREGATOR */ + /* per RFC ignore AS4_PATH and AS4_AGGREGATOR */ if (nasp) attr_free(a, nasp); if (naggr) @@ -1616,11 +1616,11 @@ rde_as4byte_fixup(struct rde_peer *peer, struct rde_aspath *a) fatalx("attr_optadd failed but impossible"); } } - /* there is no need for NEW_AGGREGATOR any more */ + /* there is no need for AS4_AGGREGATOR any more */ if (naggr) attr_free(a, naggr); - /* merge NEW_ASPATH with ASPATH */ + /* merge AS4_PATH with ASPATH */ if (nasp) aspath_merge(a, nasp); } diff --git a/usr.sbin/bgpd/rde.h b/usr.sbin/bgpd/rde.h index 154cdf42dff..03899c608ed 100644 --- a/usr.sbin/bgpd/rde.h +++ b/usr.sbin/bgpd/rde.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.h,v 1.103 2008/11/21 17:41:22 claudio Exp $ */ +/* $OpenBSD: rde.h,v 1.104 2009/01/13 21:35:16 sthen Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> and @@ -107,8 +107,8 @@ enum attrtypes { ATTR_MP_REACH_NLRI=14, ATTR_MP_UNREACH_NLRI=15, ATTR_EXT_COMMUNITIES=16, - ATTR_NEW_ASPATH=17, - ATTR_NEW_AGGREGATOR=18 + ATTR_AS4_PATH=17, + ATTR_AS4_AGGREGATOR=18 }; /* attribute flags. 4 low order bits reserved */ @@ -154,7 +154,7 @@ LIST_HEAD(prefix_head, prefix); #define F_ATTR_MED_ANNOUNCE 0x00020 #define F_ATTR_MP_REACH 0x00040 #define F_ATTR_MP_UNREACH 0x00080 -#define F_ATTR_AS4BYTE_NEW 0x00100 /* NEW_ASPATH or NEW_AGGREGATOR */ +#define F_ATTR_AS4BYTE_NEW 0x00100 /* AS4_PATH or AS4_AGGREGATOR */ #define F_ATTR_LOOP 0x00200 /* path would cause a route loop */ #define F_PREFIX_ANNOUNCED 0x01000 #define F_NEXTHOP_REJECT 0x02000 diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c index 0c82726cc54..07805720f4c 100644 --- a/usr.sbin/bgpd/rde_attr.c +++ b/usr.sbin/bgpd/rde_attr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_attr.c,v 1.76 2008/05/08 09:51:46 henning Exp $ */ +/* $OpenBSD: rde_attr.c,v 1.77 2009/01/13 21:35:16 sthen Exp $ */ /* * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org> @@ -588,7 +588,7 @@ aspath_merge(struct rde_aspath *a, struct attr *attr) ascnt = aspath_count(attr->data, attr->len); if (ascnt > a->aspath->ascnt) { - /* ASPATH is shorter then NEW_ASPATH no way to merge */ + /* ASPATH is shorter then AS4_PATH no way to merge */ attr_free(a, attr); return; } diff --git a/usr.sbin/bgpd/rde_update.c b/usr.sbin/bgpd/rde_update.c index ecc619c38b8..80b73e2acbe 100644 --- a/usr.sbin/bgpd/rde_update.c +++ b/usr.sbin/bgpd/rde_update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_update.c,v 1.63 2008/12/12 16:05:30 claudio Exp $ */ +/* $OpenBSD: rde_update.c,v 1.64 2009/01/13 21:35:16 sthen Exp $ */ /* * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org> @@ -774,7 +774,7 @@ up_generate_attr(struct rde_peer *peer, struct update_attr *upa, if (plen == 0) r = 0; else if ((r = attr_write(up_attr_buf + wlen, len, flags, - ATTR_NEW_ASPATH, pdata, plen)) == -1) + ATTR_AS4_PATH, pdata, plen)) == -1) return (-1); wlen += r; len -= r; free(pdata); @@ -784,7 +784,7 @@ up_generate_attr(struct rde_peer *peer, struct update_attr *upa, if (!(a->flags & F_PREFIX_ANNOUNCED)) flags |= ATTR_PARTIAL; if ((r = attr_write(up_attr_buf + wlen, len, flags, - ATTR_NEW_AGGREGATOR, newaggr->data, newaggr->len)) == -1) + ATTR_AS4_AGGREGATOR, newaggr->data, newaggr->len)) == -1) return (-1); wlen += r; len -= r; } |