summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpctl
AgeCommit message (Collapse)Author
2021-05-27Add the bits needed in bgpctl to show the new ADD-PATH and enhancedClaudio Jeker
route refresh capabilities in the neighbor output.
2021-05-20Fix bgpctl show mrt argument list. Seems like peers was added in the wrongClaudio Jeker
spot. Noticed and diff provided by Paul de Weerd.
2021-05-06export [ none | default-route ] changes are not handled by reload.Claudio Jeker
2021-05-03Print the timestamps both formatted and as a time in seconds field inClaudio Jeker
the various JSON object that have time values. OK benno@
2021-04-26Print out both the sent "Neighbor capabilities" and the "NegotiatedClaudio Jeker
capabilities" for a session. Especially the multiprotocol capability can confuse because both sides need to allow a protocol to enable it. The JSON code dumps all the capabilities for local, remote and negotiated. OK denis@, sthen@
2021-04-15Fix bgpctl show mrt for UPDATE messages. The call to output->attr() wasClaudio Jeker
incorrect. Adjust output->attr() to take a reqflag argument instead of a struct parse_result pointer since that is the only bit needed. Found by and OK procter@, OK deraadt@
2021-03-01off by one in bounds testJonathan Gray
ok claudio@
2021-02-16Add `bgpctl show rtr` to display basic information about RTR sessions.Claudio Jeker
OK job@
2021-01-25Adjust code since bgpd added an extra argument to aspath_verify() toClaudio Jeker
reject AS_SET segments. In bgpctl this is always off. OK benno@
2021-01-18Adjust code to the change of struct bgpd_addr in bgpd.Claudio Jeker
OK denis@
2020-12-30Add 'bgpctl show sets' to display information about the roa-set, as-sets,Claudio Jeker
and prefix-sets loaded into bgpd. OK benno@
2020-10-21Include endian.h for htobe64().Claudio Jeker
2020-10-21No need to include sys/cdefs.h hereClaudio Jeker
2020-05-12Remove unused token BULK and for PREFIX and ADDRESS the table value is alwaysClaudio Jeker
NULL so there is no need to change action in those cases. This was used some time ago by the show rib code. OK kn@, sthen@, benno@, deraadt@
2020-05-11Add support for VPNv6 in the family keyword of show ribClaudio Jeker
OK benno@ phessler@
2020-05-10In bgpctl argument parser, re-arrange 'reason' parsing ('nei action [reason]')Theo de Raadt
to be more generic, then change 'reload' to take take a '[reason]' also, which will be logged by bgpd. ok kn claudio
2020-05-04Using int64_t together with printf %llu is not portable. Either add aClaudio Jeker
cast in the printf to unsigned long long or just use unsigned long long from the start. In this case it is better to switch the type. Similar changes had been done before. OK deraadt@
2020-05-03Correctly name max_out_prefix and don't clobber the max_prefix value.Claudio Jeker
Also include the group name in the general neighbor description. Both issues reported by Patrick Velder OK deraadt@
2020-05-02Minimal documentation of JSON output.Claudio Jeker
2020-05-02Add support to output data in JSON. This is still work in progress andClaudio Jeker
the output structures may still change but it should be a good starting point for poeple to start playing with it. OK benno@, job@, deraadt@
2020-05-02Adjust fmt_attr() to pass in -1 for flags to tell it you don't careClaudio Jeker
about the flags of the attribute. Part of the JSON output diff. OK job@, benno@, deraadt@
2020-05-02Indirect the output functions through function pointers so that theyClaudio Jeker
can be changed easily. This will be used later on to add JSON output. OK benno@, job@, deraadt@
2020-05-02Cleanup the output functions a bit. show_neighbor_full() should print someClaudio Jeker
values only if the session is established or show it unconditonally (for shutdown message and last notficiation error codes. Adjust show_attr() a bit, print ORIGIN as string and add support for AID_VPN_IPv6. General add some warning if length checks fail. OK job@, benno@, deraadt@ as part of a bigger diff
2020-03-20Reshuffle code more to separate out the output functions into output.c.Claudio Jeker
Rewrite some functions to return a string instead of calling printf directly. OK benno@
2020-01-24Extend 'bgpctl show neighbor' to include the received and sent prefixClaudio Jeker
count. Also show the max-prefix out limit if one is set. OK job@
2020-01-22delete wasteful ;;Theo de Raadt
ok tedu
2020-01-21Report sent or received errors (normally not both at the same time).Claudio Jeker
With this the last notfication causing a session teardown will be shown in bgpctl show neighbor output. OK denis@ deraadt@
2020-01-21Update get_errstr() to report errors like log_notification() in bgpd.Claudio Jeker
With this suberrors of cease will be reported which is very helpful. OK denis@ deraadt@
2020-01-16when parsing ASN, don't \0-split the original string, as it may be neededTheo de Raadt
for error reporting. ok benno
2020-01-09Adjust time printing to the changes done in bgpd. Most timestamps areClaudio Jeker
now relative only last_updown, last_read and lastwrite are still based on CLOCK_MONOTONIC. OK denis@
2019-12-31Rename print_timer() to show_timer() and move it to output.cClaudio Jeker
Currently this needs a bit of a hack because fmt_timeframe() does not really print a timeframe but instead needs a timestamp relative to now. This needs to be adjusted but will be done later.
2019-12-20Split out show functions into a new file called output.cClaudio Jeker
OK benno@
2019-12-20Shuffle the fmt_timeframe functions and change fmt_timeframe() to avoidClaudio Jeker
printing negative time frames (caused by jumping the system clock back in time). OK benno@
2019-12-20Change show_mrt_dump() to call show_rib() instead of the internalClaudio Jeker
show_rib_detail() and show_rib_brief() functions. OK benno@
2019-12-19Change the way individual show functions are called. Up until now an imsgClaudio Jeker
was passed to each function and output happened based on the imsg type. Now show() will look at the imsg and based on the type call the right function to output this type. Because of this every show function is now only displaying one specific object. OK benno@
2019-12-13Remove some more show_*_head() functions. Compiler agrees.Claudio Jeker
2019-12-13Remove show_rib_summary_head() it is no longer used.Claudio Jeker
Reminded by denis@
2019-12-13First step of refactoring the output processing of bgpctl. MoveClaudio Jeker
header printing into show_head() and printing of the data into show(), these are now the only entrypoints where data is printed. OK denis@
2019-11-27Adjust after changing the struct ctl_show_rib (removal of aspath_len)Claudio Jeker
OK benno@
2019-10-19The size limit of the shutdown reason was relaxed to 255 characters butClaudio Jeker
instead of mentioning the limit, remove it. bgpctl will properly error out if the reason is too long. OK job@ sthen@
2019-09-27Implement 'bgpctl show rib 8.8.8.8 or-shorter' to show all routes coveringClaudio Jeker
8.8.8.8. Additionally add 'or-longer' as an alias for 'all'. OK job@ sthen@
2019-09-25also show peer AS and description in "bgpctl sh nei group XXX terse" outputStuart Henderson
ok deraadt@ claudio@
2019-09-24add the neighbour's address, to disambiguate peers in the output fromStuart Henderson
"bgpctl sh nei group XX terse". feedback benno@ ok claudio@
2019-08-05Add a comment why network_bulk() is not using send_filterset(). UsingClaudio Jeker
send_filterset() would result in a use after free because send_filterset() frees the set after sending but network_bulk() runs in a loop.
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