summaryrefslogtreecommitdiff
path: root/proto/rpki/packets.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto/rpki/packets.c')
-rw-r--r--proto/rpki/packets.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/proto/rpki/packets.c b/proto/rpki/packets.c
index e9d24fb8..dd11f997 100644
--- a/proto/rpki/packets.c
+++ b/proto/rpki/packets.c
@@ -729,12 +729,22 @@ rpki_prefix_pdu_2_net_addr(const struct pdu_header *pdu, net_addr_union *n)
static int
rpki_handle_prefix_pdu(struct rpki_cache *cache, const struct pdu_header *pdu)
{
+ const struct rpki_config *cf = (void *) cache->p->p.cf;
+
const enum pdu_type type = pdu->type;
ASSERT(type == IPV4_PREFIX || type == IPV6_PREFIX);
net_addr_union addr = {};
rpki_prefix_pdu_2_net_addr(pdu, &addr);
+ if (cf->ignore_max_length)
+ {
+ if (type == IPV4_PREFIX)
+ addr.roa4.max_pxlen = IP4_MAX_PREFIX_LENGTH;
+ else
+ addr.roa6.max_pxlen = IP6_MAX_PREFIX_LENGTH;
+ }
+
struct channel *channel = NULL;
if (type == IPV4_PREFIX)