1. Revert panic back into the code.
- Fort SHOULD die as soon as it realizes the VRP table is corrupted, as
we should not send garbage to the routers.
- Also, I'm not entirely sure the code would not crash later anyway,
since the table is, in fact, corrupted.
- Plus, if it doesn't crash, there would be no core dump to further
analyze the bug.
2. Point bug output to the currently active bug report
Might help us get some output earlier.
{
FILE *out = arg;
- if (vrp->addr_fam != AF_INET && vrp->addr_fam != AF_INET6) {
- /* pr_crit("Unknown family type"); TODO (issue83) */
- return 0;
- }
+ if (vrp->addr_fam != AF_INET && vrp->addr_fam != AF_INET6)
+ pr_crit("Unknown family type");
fprintf(out, "AS%u,%s/%u,%u\n", vrp->asn,
inet_ntop(vrp->addr_fam, &vrp->prefix, addr_buf, INET6_ADDRSTRLEN),
HASH_ITER(hh, table->roas, node, tmp) {
vrp = &node->data;
if (vrp->addr_fam != AF_INET && vrp->addr_fam != AF_INET6) {
- pr_op_err("%s: VRP corrupted! [%u %s/%u-%u %u] %u/%u",
+ pr_crit("%s: VRP corrupted! [%u %s/%u-%u %u] %u/%u "
+ "(Please report this output to https://github.com/NICMx/FORT-validator/issues/89)",
prefix,
vrp->asn,
addr2str6(&vrp->prefix.v6, buffer),
vrp->addr_fam,
roa_counter,
roa_count);
- return;
}
roa_counter++;
}
return deltas_v6_add(get_deltas_array6(deltas, op), &delta.v6);
}
- pr_val_err("Unknown protocol: [%u %s/%u-%u %u] %c %u/%u",
+ pr_crit("Unknown protocol: [%u %s/%u-%u %u] %c %u/%u "
+ "(Please report this output to https://github.com/NICMx/FORT-validator/issues/89)",
vrp->asn,
addr2str6(&vrp->prefix.v6, buffer),
vrp->prefix_length,
r1type,
roa_counter,
roa_count);
- return 0;
}
int