diff options
author | Joerg Goltermann <gollo@cvs.openbsd.org> | 2008-10-22 10:05:56 +0000 |
---|---|---|
committer | Joerg Goltermann <gollo@cvs.openbsd.org> | 2008-10-22 10:05:56 +0000 |
commit | 785de0575d013e89400a9eccbe319eed8f37ccd5 (patch) | |
tree | 6a2e6494f43820347d2c0cb4f7420dde4fb78011 /usr.sbin | |
parent | ac935939d2c0019152c349397699491e8118a0e6 (diff) |
fix format of AS number output
ok henning@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/tcpdump/print-cnfp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-cnfp.c b/usr.sbin/tcpdump/print-cnfp.c index b19868c277f..2a210aecd4b 100644 --- a/usr.sbin/tcpdump/print-cnfp.c +++ b/usr.sbin/tcpdump/print-cnfp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-cnfp.c,v 1.7 2007/05/29 10:42:25 canacar Exp $ */ +/* $OpenBSD: print-cnfp.c,v 1.8 2008/10/22 10:05:55 gollo Exp $ */ /* * Copyright (c) 1998 Michael Shalayeff @@ -111,7 +111,7 @@ cnfp_print(register const u_char *cp, u_int len, register const u_char *bp) if (ver == 5) { snprintf(buf, sizeof buf, "/%d", (ntohl(nr->masks) >> 24) & 0xff); - snprintf(asbuf, sizeof asbuf, "%d:", + snprintf(asbuf, sizeof asbuf, ":%d", (ntohl(nr->asses) >> 16) & 0xffff); } printf("\n %s%s%s:%u ", inet_ntoa(nr->src_ina), buf, asbuf, @@ -120,7 +120,7 @@ cnfp_print(register const u_char *cp, u_int len, register const u_char *bp) if (ver == 5) { snprintf(buf, sizeof buf, "/%d", (ntohl(nr->masks) >> 16) & 0xff); - snprintf(asbuf, sizeof asbuf, "%d:", + snprintf(asbuf, sizeof asbuf, ":%d", ntohl(nr->asses) & 0xffff); } printf("> %s%s%s:%u ", inet_ntoa(nr->dst_ina), buf, asbuf, |