mirror of
https://github.com/bgp/bgpq4
synced 2025-02-28 08:53:11 +00:00
Remove support to expand as23456 entirely
This commit is contained in:
@@ -7,7 +7,7 @@ SYNOPSIS
|
|||||||
--------
|
--------
|
||||||
|
|
||||||
```
|
```
|
||||||
bgpq4 [-h host[:port]] [-S sources] [-Ez] [-f asn | -F fmt | -G asn | -t] [-2346ABbDdJjNnpsUX] [-a asn] [-r len] [-R len] [-m max] [-W len] OBJECTS [...] EXCEPT OBJECTS
|
bgpq4 [-h host[:port]] [-S sources] [-Ez] [-f asn | -F fmt | -G asn | -t] [-346ABbDdJjNnpsUX] [-a asn] [-r len] [-R len] [-m max] [-W len] OBJECTS [...] EXCEPT OBJECTS
|
||||||
```
|
```
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
@@ -19,10 +19,6 @@ based on RADB data.
|
|||||||
|
|
||||||
The options are as follows:
|
The options are as follows:
|
||||||
|
|
||||||
#### -2
|
|
||||||
|
|
||||||
Allow routes registered for as23456 (transition-as) (default: false)
|
|
||||||
|
|
||||||
#### -3
|
#### -3
|
||||||
|
|
||||||
Assume that your device is asn32-capable.
|
Assume that your device is asn32-capable.
|
||||||
@@ -277,7 +273,7 @@ and ASN32
|
|||||||
as-path-group NN {
|
as-path-group NN {
|
||||||
as-path a0 "^112(112)*$";
|
as-path a0 "^112(112)*$";
|
||||||
as-path a1 "^112(.)*(1898|5539|8495|8763|8878|12136|12931|15909)$";
|
as-path a1 "^112(.)*(1898|5539|8495|8763|8878|12136|12931|15909)$";
|
||||||
as-path a2 "^112(.)*(21358|23456|23600|24151|25152|31529|34127|34906)$";
|
as-path a2 "^112(.)*(21358|23600|24151|25152|31529|34127|34906)$";
|
||||||
as-path a3 "^112(.)*(35052|41720|43628|44450|196611)$";
|
as-path a3 "^112(.)*(35052|41720|43628|44450|196611)$";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
bgpq4.8
2
bgpq4.8
@@ -56,8 +56,6 @@ access-lists, policy-statement terms and as-path lists) based on RADB data.
|
|||||||
.Pp
|
.Pp
|
||||||
The options are as follows:
|
The options are as follows:
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Fl 2
|
|
||||||
accept routes registered for as23456 (transition-as) (default: false)
|
|
||||||
.It Fl 3
|
.It Fl 3
|
||||||
assume that your device is asn32-safe.
|
assume that your device is asn32-safe.
|
||||||
.It Fl 4
|
.It Fl 4
|
||||||
|
|||||||
10
bgpq4.c
10
bgpq4.c
@@ -21,16 +21,13 @@
|
|||||||
extern int debug_expander;
|
extern int debug_expander;
|
||||||
extern int debug_aggregation;
|
extern int debug_aggregation;
|
||||||
extern int pipelining;
|
extern int pipelining;
|
||||||
extern int expand_as23456;
|
|
||||||
extern int expand_special_asn;
|
extern int expand_special_asn;
|
||||||
|
|
||||||
int
|
int
|
||||||
usage(int ecode)
|
usage(int ecode)
|
||||||
{
|
{
|
||||||
printf("\nUsage: bgpq4 [-h host[:port]] [-S sources] [-E|G <num>"
|
printf("\nUsage: bgpq4 [-h host[:port]] [-S sources] [-E|G <num>"
|
||||||
"|f <num>|t] [-2346ABbdJjKNnwXz] [-R len] <OBJECTS>...\n");
|
"|f <num>|t] [-346ABbdJjKNnwXz] [-R len] <OBJECTS>...\n");
|
||||||
printf(" -2 : allow routes belonging to as23456 (transition-as) "
|
|
||||||
"(default: false)\n");
|
|
||||||
printf(" -3 : assume that your device is asn32-safe\n");
|
printf(" -3 : assume that your device is asn32-safe\n");
|
||||||
printf(" -4 : generate IPv4 prefix-lists (default)\n");
|
printf(" -4 : generate IPv4 prefix-lists (default)\n");
|
||||||
printf(" -6 : generate IPv6 prefix-lists\n");
|
printf(" -6 : generate IPv6 prefix-lists\n");
|
||||||
@@ -150,12 +147,9 @@ main(int argc, char* argv[])
|
|||||||
if (getenv("IRRD_SOURCES"))
|
if (getenv("IRRD_SOURCES"))
|
||||||
expander.sources=getenv("IRRD_SOURCES");
|
expander.sources=getenv("IRRD_SOURCES");
|
||||||
|
|
||||||
while ((c = getopt(argc,argv,"2346a:AbBdDEF:S:jJKf:l:L:m:M:NnW:pr:R:G:tTh:UwXsz"))
|
while ((c = getopt(argc,argv,"346a:AbBdDEF:S:jJKf:l:L:m:M:NnW:pr:R:G:tTh:UwXsz"))
|
||||||
!=EOF) {
|
!=EOF) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case '2':
|
|
||||||
expand_as23456 = 1;
|
|
||||||
break;
|
|
||||||
case '3':
|
case '3':
|
||||||
expander.asn32 = 1;
|
expander.asn32 = 1;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
|
|
||||||
int debug_expander = 0;
|
int debug_expander = 0;
|
||||||
int pipelining = 1;
|
int pipelining = 1;
|
||||||
int expand_as23456 = 0;
|
|
||||||
int expand_special_asn = 0;
|
int expand_special_asn = 0;
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
@@ -226,9 +225,6 @@ bgpq_expander_add_as(struct bgpq_expander* b, char* as)
|
|||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (asno == 23456 && !expand_as23456)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (!expand_special_asn && (asno >= 64496 && asno <= 65536))
|
if (!expand_special_asn && (asno >= 64496 && asno <= 65536))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user