summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpctl
AgeCommit message (Collapse)Author
2019-07-03Add a default case to subtype switch in the table v2 parser.Claudio Jeker
If a unknown subtype is encountered it is better to fail.
2019-07-03Remove unneccessary type castClaudio Jeker
2019-06-28The bgpctl parser can not handle neighbor and neighbors at the same time.Claudio Jeker
It will always complain that neighbor is ambiguous. Switch neighbors to peers to resolve the issue.
2019-06-28Implement the bits and pieces that are needed to dump MRT_DUMP_V2_RIB_GENERICClaudio Jeker
messages and BGP MPLS VPNs. OK benno@
2019-06-25Remove irrfilter from bgpctl. The current code is not very useful.Claudio Jeker
Trying to parse RPSL has shown to be impossible. For now tools like bgpq3 (in ports) can be used to generate AS and prefix sets based on IRR data. OK job@ deraadt@ sthen@ benno@
2019-06-17Cleanup some spaces here as well. Again no binary change.Claudio Jeker
2019-06-17Adjust and sync the code with the new struct community code from bgpd.Claudio Jeker
OK benno@
2019-05-31similar to note recently added to bgpd.conf(5), mention in docs forStuart Henderson
"bgpctl reload" that ipsec/md5sig and "export none/default-route" only take effect when the session is reset. sounds good to claudio
2019-05-23Implement bgpctl show mrt neighbors, a command to print the neighbor tableClaudio Jeker
of MRT TABLE_DUMP_V2 dumps. It only works with TABLE_DUMP_V2 dumps on other table dumps the neighbor of the first entry is printed since those table dumps don't have a neighbor table. OK sthen@ benno@
2019-05-14make "bgpctl sh rib detail *out*" look less confusingSebastian Benoit
ok claudio@
2019-05-03missing breakJonathan Gray
ok benno@
2019-04-25Adjust the MRT notification parser similar to bgpd to support extendedClaudio Jeker
shutdown communication messages.
2019-04-10Instead of a (ulong) case just use %zu in printf and remove the cast.Claudio Jeker
Helps portable. OK deraadt@
2019-04-10Include endian.h since htobe* or be*toh is used. Helps with protable.Claudio Jeker
OK deraadt@
2019-02-27Adjust to the last bgpd change. sa2addr gets an extra agrument andClaudio Jeker
local and remote address in struct peer changed to bgpd_addrs. OK benno@
2019-02-25Use struct bgpd_addr instead of a union of sockaddrs to store addressesClaudio Jeker
in the mrt dump structs. This is more compatible with bgpctl since it uses struct bgpd_addr in most cases anyway. OK kn@
2019-02-21type is not used here. Still keep a comment around to keep the codeClaudio Jeker
similar to all other attr parsers.
2019-02-21Adjust bgpctl to the new ctl_show_interface struct that is sent instead ofClaudio Jeker
the system specific struct kif. Makes this code a lot more portable but still prints the same info in the same way. OK sthen@
2019-02-19Switch betoh64 to the posix be64toh also remove some casts since we nowClaudio Jeker
use long long instead of int64_t.
2019-02-18Bring in fixes in the community parsing code done in parse.y and fixClaudio Jeker
a bug that sneaked in some time ago which broke large community parsing. Bug found by gcc on a linux box
2019-02-11Adjust to last bgpd commit changing the MPLS VPN configuration.Claudio Jeker
Sync the community handling code to be in sync with parsing code of bgpd. To inject networks into MPLS VPN it is required to specify the route distinguisher as part of the attributes. With and OK dlg@, OK denis@
2019-01-20Allow 'neighbor descripton' to be used like neighbor group descriptionClaudio Jeker
which will match all neighbors in that group. Works for bgpctl neighbor group <name> [clear|destroy|down|refresh|up] bgpctl show neighbor group <name> [messages|terse|timers] bgpctl show rib neighbor group <name> ... Manpage bits from sthen@ OK benno@ sthen@
2018-12-19Adjust bgpctl now that filter_extcommunity is no more.Claudio Jeker
OK benno@
2018-12-12zap trailing whitespace;Jason McIntyre
2018-12-11bgpctl can no long reuse the aspath_match function from bgpd so move theClaudio Jeker
roughly the same function here called match_aspath(). OK denis@
2018-12-05Set the routing table when adding a networkdenis
OK claudio@
2018-11-28Adjust bgpctl to handle the community changes done in bgpd.Claudio Jeker
OK job@, phessler@
2018-11-01fix typosdenis
Noticed by David Higgs, thanks. OK claudio@
2018-10-31Remove extra ,Claudio Jeker
Noticed by denis@
2018-10-31Show the number of references hold by struct rde_aspath objects (which shouldClaudio Jeker
be the same as the number of prefixes for now). OK denis@
2018-10-26Show how much memory is used for *-sets.Claudio Jeker
OK deraadt@
2018-10-03add filter option based on origin validation statedenis
OK claudio@
2018-10-01Expose BGP Origin Validation state in bgpctl show commandsjob
OK denis@ claudio@
2018-09-26Rename AS_NONE to AS_UNDEF here as well. OK compiler & grepClaudio Jeker
2018-09-20as_set_match() changed again, so adjust it here too.Claudio Jeker
OK benno@
2018-09-17Rename struct as_set to struct irr_as_set to not conflict with bgpd.Claudio Jeker
OK $CC
2018-09-14Adjust the dummy as_set_match function to new prototype after last bgpd commitClaudio Jeker
OK benno@
2018-09-09sync header line with whats actually in the output.Sebastian Benoit
ok claudio@
2018-09-09Make it clear what 'dynamically added' prefixes are.Sebastian Benoit
Say that adding a prefix will overwrite an existing (equal) prefix. ok claudio@
2018-09-07When parsing AS numbers set both as_min and as_max to the parsed value.Claudio Jeker
Not strictly needed but better to have both initialized.
2018-09-07Add a dummy as_set_match() function since it is needed to link util.c now.Claudio Jeker
2018-09-06Use getline() for the network bulk code. Also make the parser better byClaudio Jeker
doing tokenizing on spaces and correctly ignore comments. This should make this feature in general more robust. OK benno@
2018-09-05Adjust after change of struct filter_as.Claudio Jeker
OK phessler@
2018-08-30Use past tense for treated as withdrawn since the withdraw happened in the past.Claudio Jeker
From and with jmc@
2018-08-29Introduce 'bgpctl show rib error' to show all prefixes that got flaggedClaudio Jeker
invalid because of a soft parsing error. These prefixes are never eligible or valid but the listing may help to understand what is going on. 'bgpctl show rib error' run automatically on Adj-RIB-In since that is the only RIB that has such prefixes. OK sthen@ denis@
2018-07-29mestre and i both concluded pledge can be tightened, "unix" handles theTheo de Raadt
coming code and "rpath wpath" isn't needed ok claudio
2018-07-22First iteration of implementing full mrt dumping/printing support in bgpctl.Claudio Jeker
This is good enough as a start but I guess output could be nicer. OK benno@
2018-07-22Move functions to print link status etc. to util.c so that bgpd can use themClaudio Jeker
as well. OK benno@
2018-07-20Print the timestamp embedded in mrt files for update and status messages.Claudio Jeker
Also implemented the extended precision format so microseconds are printed as well when available. The output is relative to the previous message and follows what kdump does. OK benno@
2018-07-20There is no need to have bgpd running when running bgpctl show mrt.Claudio Jeker
The first thing the code actually does is closing the socket. Instead move the code up to where currently the IRR filter code is. Additionally change the late pledges to just stdio since nothing after that needs rpath or wpath. OK benno@