diff options
author | Pavel Tvrdík <pawel.tvrdik@gmail.com> | 2016-01-14 10:03:50 +0100 |
---|---|---|
committer | Pavel Tvrdík <pawel.tvrdik@gmail.com> | 2016-01-14 14:31:55 +0100 |
commit | f9d729ab682156cc658eb451b95d7cbd37dfa139 (patch) | |
tree | 36a02b1b690fb7f85f3a713aed7f01ca2cca35c5 /lib | |
parent | 9a883adf954c2f68085a398e8ab38bd54831cf52 (diff) |
NET ROAx: add max_pxlen, fix format
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net.c | 4 | ||||
-rw-r--r-- | lib/net.h | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -48,9 +48,9 @@ net_format(const net_addr *N, char *buf, int buflen) case NET_VPN6: return bsnprintf(buf, buflen, "%u:%u %I6/%d", (u32) (n->vpn6.rd >> 32), (u32) n->vpn6.rd, n->vpn6.prefix, n->vpn6.pxlen); case NET_ROA4: - return bsnprintf(buf, buflen, "%I4/%d AS%u", n->roa4.prefix, n->roa4.pxlen, n->roa4.asn); + return bsnprintf(buf, buflen, "%I4/%u-%u AS%u", n->roa4.prefix, n->roa4.pxlen, n->roa4.max_pxlen, n->roa4.asn); case NET_ROA6: - return bsnprintf(buf, buflen, "%I6/%d AS%u", n->roa6.prefix, n->roa6.pxlen, n->roa6.asn); + return bsnprintf(buf, buflen, "%I6/%u-%u AS%u", n->roa6.prefix, n->roa6.pxlen, n->roa6.max_pxlen, n->roa6.asn); } return 0; @@ -64,7 +64,7 @@ typedef struct net_addr_roa4 { u8 pxlen; u16 length; ip4_addr prefix; - u8 max_pxlen; + u32 max_pxlen; u32 asn; } net_addr_roa4; @@ -73,7 +73,7 @@ typedef struct net_addr_roa6 { u8 pxlen; u16 length; ip6_addr prefix; - u8 max_pxlen; + u32 max_pxlen; u32 asn; } net_addr_roa6; |