mirror of
https://github.com/bgp/bgpq4
synced 2025-02-28 08:53:11 +00:00
By default disallow 23456 as origin
Can be bypassed with '-p'
This commit is contained in:
10
expander.c
10
expander.c
@@ -183,7 +183,7 @@ int
|
||||
bgpq_expander_add_as(struct bgpq_expander *b, char *as)
|
||||
{
|
||||
char *eoa;
|
||||
uint32_t asno = 0;
|
||||
uint32_t asno = 0;
|
||||
struct asn_entry *asne;
|
||||
|
||||
if (!b || !as)
|
||||
@@ -191,14 +191,14 @@ bgpq_expander_add_as(struct bgpq_expander *b, char *as)
|
||||
|
||||
asno = strtoul(as + 2, &eoa, 10);
|
||||
if (eoa && *eoa != 0) {
|
||||
sx_report(SX_ERROR,"Invalid symbol in AS number: '%c' in %s\n",
|
||||
sx_report(SX_ERROR, "Invalid symbol in AS number: '%c' in %s\n",
|
||||
*eoa, as);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!expand_special_asn &&
|
||||
(asno >= 4200000000ul || (asno >= 64496 && asno <= 65551))) {
|
||||
sx_report(SX_ERROR,"Invalid AS number: %u\n", asno);
|
||||
if (!expand_special_asn && (asno == 23456 || asno >= 4200000000ul
|
||||
|| (asno >= 64496 && asno <= 65551))) {
|
||||
sx_report(SX_ERROR, "Invalid AS number: %u\n", asno);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user