1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

fix format of AS number output

ok henning@
This commit is contained in:
gollo 2008-10-22 10:05:55 +00:00
parent da9155cce2
commit 1adf99fd90

View File

@ -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,