]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Fix AS-Path printing; the path segment length is the number of ASs
authorfenner <fenner>
Mon, 15 Oct 2001 23:27:31 +0000 (23:27 +0000)
committerfenner <fenner>
Mon, 15 Oct 2001 23:27:31 +0000 (23:27 +0000)
 in the path segment, not the number of bytes.

Submitted by: Jan Oravec <[email protected]>

CREDITS
print-bgp.c

diff --git a/CREDITS b/CREDITS
index 5eec27aba0b46b9bdd36381a5d80133e59bc0c0e..dbbb722ceabdbcdba42c69367cdbd0f13c1b0ea5 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -30,8 +30,9 @@ Additional people who have contributed patches:
        Gisle Vanem                     <[email protected]>
        Hannes Gredler                  <[email protected]>
        Harry Raaymakers                <[email protected]>
-       Jason R. Thorpe                 <[email protected]>
        Jakob Schlyter                  <[email protected]>
+       Jan Oravec                      <[email protected]>
+       Jason R. Thorpe                 <[email protected]>
        JINMEI Tatuya                   <[email protected]>
        Jefferson Ogata                 <[email protected]>
        Jeffrey Hutzelman               <[email protected]>
index 08522fad8a92d86cf44f2cb0ad3e9fde0240dce4..3fc6954270f78096e245a18c31fd5d272f3f212e 100644 (file)
@@ -33,7 +33,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-     "@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.23 2001-09-17 21:57:55 fenner Exp $";
+     "@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.24 2001-10-15 23:27:31 fenner Exp $";
 #endif
 
 #include <sys/param.h>
@@ -346,7 +346,7 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *dat, int len)
                        if (p[0] == 3 || p[0] == 4)
                                printf("confed");
                        printf("%s", (p[0] & 1) ? "{" : "");
-                       for (i = 0; i < p[1]; i += 2) {
+                       for (i = 0; i < p[1] * 2; i += 2) {
                                printf("%s%u", i == 0 ? "" : " ",
                                        EXTRACT_16BITS(&p[2 + i]));
                        }