summaryrefslogtreecommitdiffstats
path: root/nest
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-08-25 19:01:37 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-08-25 19:01:37 +0200
commit949bd34e81ee99370decdabefa51c9c11ffe915b (patch)
tree0b1235cf3aeebdf0f161d2782a66d9fc7d4d7369 /nest
parenta0c405501fa6a0df8472f1598256e725cec753fd (diff)
downloadbird-949bd34e81ee99370decdabefa51c9c11ffe915b.tar
bird-949bd34e81ee99370decdabefa51c9c11ffe915b.zip
Fixes bug related to AS2->AS4 conversion.
Diffstat (limited to 'nest')
-rw-r--r--nest/a-path.c6
-rw-r--r--nest/attrs.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/nest/a-path.c b/nest/a-path.c
index dba214d..0a4bf82 100644
--- a/nest/a-path.c
+++ b/nest/a-path.c
@@ -188,6 +188,12 @@ int
as_path_getlen(struct adata *path)
{
int bs = bgp_as4_support ? 4 : 2;
+ return as_path_getlen_int(path, bs);
+}
+
+int
+as_path_getlen_int(struct adata *path, int bs)
+{
int res = 0;
u8 *p = path->data;
u8 *q = p+path->length;
diff --git a/nest/attrs.h b/nest/attrs.h
index b838ce9..eee6b37 100644
--- a/nest/attrs.h
+++ b/nest/attrs.h
@@ -28,6 +28,7 @@ int as_path_convert_to_old(struct adata *path, byte *dst, int *new_used);
int as_path_convert_to_new(struct adata *path, byte *dst, int req_as);
void as_path_format(struct adata *path, byte *buf, unsigned int size);
int as_path_getlen(struct adata *path);
+int as_path_getlen_int(struct adata *path, int bs);
int as_path_get_first(struct adata *path, u32 *orig_as);
int as_path_get_last(struct adata *path, u32 *last_as);
int as_path_is_member(struct adata *path, u32 as);