1
0
mirror of https://github.com/bgp/bgpq4.git synced 2024-05-11 05:55:05 +00:00

make -t (as-sets) work for BIRD too.

This commit is contained in:
Alexandre Snarskii
2018-10-04 13:33:06 +03:00
parent a90de3a359
commit e49e16acd3
3 changed files with 14 additions and 13 deletions

View File

@ -12,8 +12,8 @@ untagged yet (2018-10-02)
By default checks route[4] presence, to check route6 objects shall be
used together with -6.
- cleanup OpenBGPd prefix-sets. Submitted by Claudio Jeker.
- new flag -t: generate as-sets for OpenBGPd (OpenBSD 6.4+) and JSON
formats. Based on submission by Claudio Jeker.
- new flag -t: generate as-sets for OpenBGPD (OpenBSD 6.4+), BIRD and
JSON formats. Based on submission by Claudio Jeker.
0.1.35-rc2 (2017-06-14)
- OpenBSD need <sys/select.h>. Reported by Denis Fondras.

16
bgpq3.c
View File

@ -372,14 +372,14 @@ main(int argc, char* argv[])
"supported for IOS XR\n");
};
if(expander.vendor==V_BIRD && expander.generation!=T_PREFIXLIST &&
expander.generation!=T_ASPATH) {
sx_report(SX_FATAL, "Sorry, only prefix-lists and as-paths supported "
"for BIRD output\n");
expander.generation!=T_ASPATH && expander.generation!=T_ASSET) {
sx_report(SX_FATAL, "Sorry, only prefix-lists and as-paths/as-sets "
"supported for BIRD output\n");
};
if(expander.vendor==V_JSON && expander.generation!=T_PREFIXLIST &&
expander.generation!=T_ASPATH && expander.generation!=T_ASSET) {
sx_report(SX_FATAL, "Sorry, only prefix-lists and as-paths supported "
"for JSON output\n");
sx_report(SX_FATAL, "Sorry, only prefix-lists and as-paths/as-sets "
"supported for JSON output\n");
};
if(expander.vendor==V_FORMAT && expander.generation!=T_PREFIXLIST)
sx_report(SX_FATAL, "Sorry, only prefix-lists supported in formatted "
@ -399,9 +399,9 @@ main(int argc, char* argv[])
" output only\n");
};
if(expander.generation==T_ASSET && expander.vendor!=V_JSON &&
expander.vendor!=V_OPENBGPD) {
sx_report(SX_FATAL, "As-Sets (-t) supported for JSON (-j) and OpenBGPD"
" (-B) output only\n");
expander.vendor!=V_OPENBGPD && expander.vendor!=V_BIRD) {
sx_report(SX_FATAL, "As-Sets (-t) supported for JSON (-j), OpenBGPD "
"(-B) and BIRD (-b) output only\n");
};
if(expander.asdot && expander.vendor!=V_CISCO) {

View File

@ -554,17 +554,18 @@ bgpq3_print_asset(FILE* f, struct bgpq_expander* b)
case V_JUNIPER:
case V_CISCO:
case V_CISCO_XR:
case V_BIRD:
case V_NOKIA:
case V_HUAWEI:
case V_FORMAT:
sx_report(SX_FATAL, "as-sets (-t) supported for json and openbgpd "
"only\n");
sx_report(SX_FATAL, "as-sets (-t) supported for JSON, OpenBGPD "
"and BIRD only\n");
return -1;
case V_JSON:
return bgpq3_print_json_aspath(f,b);
case V_OPENBGPD:
return bgpq3_print_openbgpd_asset(f,b);
case V_BIRD:
return bgpq3_print_bird_aspath(f,b);
};
};