OpenBSD CVS

CVS log for src/usr.sbin/bgpctl/parser.c


[BACK] Up to [local] / src / usr.sbin / bgpctl

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.134 / (download) - annotate - [select for diffs], Mon Nov 20 14:18:21 2023 UTC (6 months, 2 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.133: +3 -3 lines
Diff to previous 1.133 (colored)

KNF

Revision 1.122.4.1 / (download) - annotate - [select for diffs], Mon May 15 09:31:14 2023 UTC (12 months, 3 weeks ago) by tb
Branch: OPENBSD_7_3
Changes since 1.122: +2 -2 lines
Diff to previous 1.122 (colored) next main 1.123 (colored)

Rename 'invalid' to 'disqualified' in the 'show rib' table.

'invalid' conflicts with the 'in' keyword and the parser is not smart
enough to handle this. As a secondary benefit the term 'invalid' is
less overloaded. There are various reasons why prefixes are not eligible
in the route decision process calling them all 'invalid' is a bit harsh.

job@, tb@ and benno@ agree
from claudio

Properly handle references for nexthops and labels in filterset_copy()

Up until recently filterset_copy() was only used in the parent process
where none of those references exist but by using filterset_copy() in
the RDE to populate per-peer output filters the code needs to handle
such references. Without this rules like 'match to any set nexthop X'
will cause internal corruption on config reloads and session resets.
Bug report from Marko Cupac (marko.cupac (at) mimar.rs)
OK tb@
from claudio

Pass ASPA objects in reverse since this is what aspa_add_set() expects.
OK tb@
from claudio

Adjust bgplgd after renaming of the invalid option in bgpctl.
This does not change the query string argument. We may do this
at a later stage.
OK tb@
from claudio

This is errata/7.3/002_bgpd.patch.sig

Revision 1.133 / (download) - annotate - [select for diffs], Tue May 9 13:26:27 2023 UTC (13 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.132: +2 -2 lines
Diff to previous 1.132 (colored)

Rename 'invalid' to 'disqualified' in the 'show rib' table.

'invalid' conflicts with the 'in' keyword and the parser is not smart
enough to handle this. As a secondary benefit the term 'invalid' is
less overloaded. There are various reasons why prefixes are not eligible
in the route decision process calling them all 'invalid' is a bit harsh.

job@, tb@ and benno@ agree

Revision 1.132 / (download) - annotate - [select for diffs], Fri Apr 21 10:49:01 2023 UTC (13 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.131: +9 -3 lines
Diff to previous 1.131 (colored)

Adjust ext community handling to support the generic transitive communities
introduced with flowspec.
OK tb@

Revision 1.131 / (download) - annotate - [select for diffs], Fri Apr 21 09:12:41 2023 UTC (13 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.130: +308 -4 lines
Diff to previous 1.130 (colored)

Implement flowspec add and delete to add/remove flowspec rules dynamically.
OK tb@

Revision 1.130 / (download) - annotate - [select for diffs], Thu Apr 20 14:01:50 2023 UTC (13 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.129: +10 -1 lines
Diff to previous 1.129 (colored)

Implement bgpctl show flowspec and bgpctl flowspec flush.

This uses the flowspec.c file from bgpd and implements the output
for flowspec only for the text printer for now. That code uses a lot
of code from printconf.c
OK tb@

Revision 1.129 / (download) - annotate - [select for diffs], Mon Apr 17 13:48:31 2023 UTC (13 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.128: +16 -64 lines
Diff to previous 1.128 (colored)

Convert all users of parse_number() to also process the next element
like it was done for communities. Again a fair amount of token tables
disappear.
OK tb@

Revision 1.128 / (download) - annotate - [select for diffs], Mon Apr 17 12:48:38 2023 UTC (13 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.127: +8 -7 lines
Diff to previous 1.127 (colored)

In parse_prefix and parse_addr only touch the addr if the functions is
successful. Do not clear it all the time since that breaks the ANYTOKEN
fallback since it resets the just set address on the next argument.
OK tb@

Revision 1.127 / (download) - annotate - [select for diffs], Mon Apr 17 11:02:40 2023 UTC (13 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.126: +20 -22 lines
Diff to previous 1.126 (colored)

Passing argv as tripple indirect pointer to match_token() is just strange.
Instead pass argc and argv as value and return the consumed number of
arguments in argsused (normally 1).
OK tb@

Revision 1.126 / (download) - annotate - [select for diffs], Mon Apr 17 10:23:32 2023 UTC (13 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.125: +65 -141 lines
Diff to previous 1.125 (colored)

Rework how communities are parsed. Use tha fact that argv and argc are
available inside match_token() and peek and consume argv[1] and for
ext-communities also argv[2].
OK tb@

Revision 1.125 / (download) - annotate - [select for diffs], Sat Apr 15 10:36:59 2023 UTC (13 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.124: +32 -7 lines
Diff to previous 1.124 (colored)

Introduce an ANYTOKEN token which can be used instead of NOTOKEN to allow
to fall back to another table if no other element in the current table
matched. ANYTOKEN needs to be the last element in a table.

With this 'bgpctl show rib 192.0.2.1 detail' works.
OK tb@

Revision 1.124 / (download) - annotate - [select for diffs], Thu Apr 13 11:52:43 2023 UTC (13 months, 4 weeks ago) by claudio
Branch: MAIN
Changes since 1.123: +44 -44 lines
Diff to previous 1.123 (colored)

Sort commands alphabetically both in the tables and manpage.
OK tb@

Revision 1.123 / (download) - annotate - [select for diffs], Wed Apr 12 17:19:16 2023 UTC (13 months, 4 weeks ago) by claudio
Branch: MAIN
Changes since 1.122: +9 -4 lines
Diff to previous 1.122 (colored)

bgpctl network bulk requires now the specification of 'add' or 'delete'.
In the add case the extra attributes can be specified afterwards.
This makes the parser behave cleaner since 'add' and 'delete' are removed
from the attribute set table.
OK tb@

Revision 1.122 / (download) - annotate - [select for diffs], Mon Mar 13 16:59:22 2023 UTC (14 months, 4 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE
Branch point for: OPENBSD_7_3
Changes since 1.121: +4 -2 lines
Diff to previous 1.121 (colored)

Extend bgpctl show rib with two new options:
 - invalid: show only routes that are not valid
 - leaked: show only routes where a route leak was detected
OK tb@

Revision 1.121 / (download) - annotate - [select for diffs], Thu Feb 2 19:23:01 2023 UTC (16 months, 1 week ago) by job
Branch: MAIN
Changes since 1.120: +2 -2 lines
Diff to previous 1.120 (colored)

Fix typo

Revision 1.120 / (download) - annotate - [select for diffs], Mon Jan 30 16:53:24 2023 UTC (16 months, 1 week ago) by claudio
Branch: MAIN
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored)

Same parseextvalue() change as in parse.y rev 1.441
Use 2-byte ASnum encoding as a default when local-as/neighbor-as is used.

Revision 1.119 / (download) - annotate - [select for diffs], Tue Jan 24 14:14:15 2023 UTC (16 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.118: +10 -1 lines
Diff to previous 1.118 (colored)

Implmement `bgpctl show rib avs invalid` and firends.
This will show all invalid ASPA paths.
OK tb@

Revision 1.118 / (download) - annotate - [select for diffs], Thu Nov 10 10:47:30 2022 UTC (19 months ago) by mbuhl
Branch: MAIN
Changes since 1.117: +2 -2 lines
Diff to previous 1.117 (colored)

A theoretical path exists where ext.data1 is not initialized by
parseextcommunity but used afterwards.
Found by codechecker.
OK claudio

Revision 1.117 / (download) - annotate - [select for diffs], Mon Oct 17 16:51:36 2022 UTC (19 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.116: +2 -2 lines
Diff to previous 1.116 (colored)

SHOW_METRICS for the actions enum. Just to match the rest.

Revision 1.116 / (download) - annotate - [select for diffs], Mon Oct 17 15:04:12 2022 UTC (19 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.115: +2 -2 lines
Diff to previous 1.115 (colored)

Use metrics as the command name and document show metrics.
OK tb@

Revision 1.115 / (download) - annotate - [select for diffs], Mon Oct 17 12:01:19 2022 UTC (19 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.114: +2 -1 lines
Diff to previous 1.114 (colored)

Implement openmetric output via bgpctl show metric command

This adds most of the generic code to output the metrics with labels
and implements some basic metrics. The code works but metrics may still
change.

OK tb@

Revision 1.114 / (download) - annotate - [select for diffs], Wed Aug 17 15:16:12 2022 UTC (21 months, 3 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.113: +6 -6 lines
Diff to previous 1.113 (colored)

Use memset() instead of bzero().
OK tb@ deraadt@

Revision 1.113 / (download) - annotate - [select for diffs], Wed Jun 22 12:27:46 2022 UTC (23 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.112: +2 -2 lines
Diff to previous 1.112 (colored)

Fix last commit. addr is already a pointer.
Noticed by anton@

Revision 1.112 / (download) - annotate - [select for diffs], Tue Jun 21 10:05:48 2022 UTC (23 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.111: +2 -3 lines
Diff to previous 1.111 (colored)

Use applymask() instead of inetXapplymask() since this code operates on
struct bgpd_addr.
OK tb@

Revision 1.111 / (download) - annotate - [select for diffs], Thu Jun 16 15:34:07 2022 UTC (23 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.110: +2 -2 lines
Diff to previous 1.110 (colored)

Remove prefixlen2mask() uasge outside of util.c. Instead use inet4applymask().
Neccessary after similar change in bgpd.
OK tb@

Revision 1.110 / (download) - annotate - [select for diffs], Wed Jun 15 10:10:50 2022 UTC (23 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.109: +10 -10 lines
Diff to previous 1.109 (colored)

Adjust after chaning F_BGPD_INSERTED to F_BGPD and removal of F_DYNAMIC

Revision 1.109 / (download) - annotate - [select for diffs], Mon Mar 21 10:16:23 2022 UTC (2 years, 2 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.108: +3 -3 lines
Diff to previous 1.108 (colored)

Adjust to renaming of F_CTL_ACTIVE/F_PREF_ACTIVE to F_CTL_ACTIVE/F_PREF_BEST
OK tb@

Revision 1.108 / (download) - annotate - [select for diffs], Sun Feb 6 09:52:32 2022 UTC (2 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.107: +24 -22 lines
Diff to previous 1.107 (colored)

Switch from u_intX_t types to stdint.h uintX_t like it was done in bgpd.
OK florian@ tb@

Revision 1.107 / (download) - annotate - [select for diffs], Mon Aug 9 08:24:36 2021 UTC (2 years, 10 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.106: +21 -4 lines
Diff to previous 1.106 (colored)

Make it possible to match on path-id in bgpctl show rib outputs.
To work properly also a neighbor needs to be selected. The assumption
here is that the peer will use the same path-id for the same peer
accross all its routes. The RFC does not require this and it is valid
to assign path-ids randomly. The path-id only matters for one specific
path but most BGP implementations seem to assign the same path-id to
multiple routes when originated from the same source.
OK benno@

Revision 1.106 / (download) - annotate - [select for diffs], Tue Feb 16 08:30:21 2021 UTC (3 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.105: +2 -1 lines
Diff to previous 1.105 (colored)

Add `bgpctl show rtr` to display basic information about RTR sessions.
OK job@

Revision 1.105 / (download) - annotate - [select for diffs], Wed Dec 30 07:31:19 2020 UTC (3 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.104: +2 -1 lines
Diff to previous 1.104 (colored)

Add 'bgpctl show sets' to display information about the roa-set, as-sets,
and prefix-sets loaded into bgpd.
OK benno@

Revision 1.104 / (download) - annotate - [select for diffs], Tue May 12 13:26:02 2020 UTC (4 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.103: +2 -14 lines
Diff to previous 1.103 (colored)

Remove unused token BULK and for PREFIX and ADDRESS the table value is always
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@

Revision 1.103 / (download) - annotate - [select for diffs], Mon May 11 07:55:18 2020 UTC (4 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.102: +8 -2 lines
Diff to previous 1.102 (colored)

Add support for VPNv6 in the family keyword of show rib
OK benno@ phessler@

Revision 1.102 / (download) - annotate - [select for diffs], Sun May 10 13:38:46 2020 UTC (4 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.101: +14 -13 lines
Diff to previous 1.101 (colored)

In bgpctl argument parser, re-arrange 'reason' parsing ('nei action [reason]')
to be more generic,  then change 'reload' to take take a '[reason]' also,
which will be logged by bgpd.
ok kn claudio

Revision 1.101 / (download) - annotate - [select for diffs], Wed Jan 22 07:52:38 2020 UTC (4 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.100: +4 -4 lines
Diff to previous 1.100 (colored)

delete wasteful ;;
ok tedu

Revision 1.100 / (download) - annotate - [select for diffs], Thu Jan 16 21:44:04 2020 UTC (4 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.99: +7 -5 lines
Diff to previous 1.99 (colored)

when parsing ASN, don't \0-split the original string, as it may be needed
for error reporting.
ok benno

Revision 1.99 / (download) - annotate - [select for diffs], Fri Sep 27 10:34:54 2019 UTC (4 years, 8 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.98: +3 -1 lines
Diff to previous 1.98 (colored)

Implement 'bgpctl show rib 8.8.8.8 or-shorter' to show all routes covering
8.8.8.8. Additionally add 'or-longer' as an alias for 'all'.
OK job@ sthen@

Revision 1.98 / (download) - annotate - [select for diffs], Fri Jun 28 12:12:06 2019 UTC (4 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.97: +2 -2 lines
Diff to previous 1.97 (colored)

The bgpctl parser can not handle neighbor and neighbors at the same time.
It will always complain that neighbor is ambiguous. Switch neighbors to
peers to resolve the issue.

Revision 1.97 / (download) - annotate - [select for diffs], Tue Jun 25 07:44:20 2019 UTC (4 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.96: +1 -72 lines
Diff to previous 1.96 (colored)

Remove irrfilter from bgpctl. The current code is not very useful.
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@

Revision 1.96 / (download) - annotate - [select for diffs], Mon Jun 17 13:46:33 2019 UTC (4 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.95: +3 -3 lines
Diff to previous 1.95 (colored)

Cleanup some spaces here as well. Again no binary change.

Revision 1.95 / (download) - annotate - [select for diffs], Mon Jun 17 11:03:07 2019 UTC (4 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.94: +98 -58 lines
Diff to previous 1.94 (colored)

Adjust and sync the code with the new struct community code from bgpd.
OK benno@

Revision 1.94 / (download) - annotate - [select for diffs], Thu May 23 14:12:06 2019 UTC (5 years ago) by claudio
Branch: MAIN
Changes since 1.93: +3 -2 lines
Diff to previous 1.93 (colored)

Implement bgpctl show mrt neighbors, a command to print the neighbor table
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@

Revision 1.93 / (download) - annotate - [select for diffs], Wed Apr 10 15:22:18 2019 UTC (5 years, 2 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.92: +2 -1 lines
Diff to previous 1.92 (colored)

Include endian.h since htobe* or be*toh is used. Helps with protable.
OK deraadt@

Revision 1.92 / (download) - annotate - [select for diffs], Wed Feb 27 04:34:21 2019 UTC (5 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored)

Adjust to the last bgpd change. sa2addr gets an extra agrument and
local and remote address in struct peer changed to bgpd_addrs.
OK benno@

Revision 1.91 / (download) - annotate - [select for diffs], Mon Feb 18 21:10:25 2019 UTC (5 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.90: +4 -5 lines
Diff to previous 1.90 (colored)

Bring in fixes in the community parsing code done in parse.y and fix
a bug that sneaked in some time ago which broke large community parsing.
Bug found by gcc on a linux box

Revision 1.90 / (download) - annotate - [select for diffs], Mon Feb 11 15:47:55 2019 UTC (5 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.89: +260 -238 lines
Diff to previous 1.89 (colored)

Adjust to last bgpd commit changing the MPLS VPN configuration.
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@

Revision 1.89 / (download) - annotate - [select for diffs], Sun Jan 20 23:30:15 2019 UTC (5 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.88: +31 -8 lines
Diff to previous 1.88 (colored)

Allow 'neighbor descripton' to be used like neighbor group description
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@

Revision 1.88 / (download) - annotate - [select for diffs], Wed Dec 19 15:27:29 2018 UTC (5 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.87: +25 -30 lines
Diff to previous 1.87 (colored)

Adjust bgpctl now that filter_extcommunity is no more.
OK benno@

Revision 1.87 / (download) - annotate - [select for diffs], Wed Nov 28 08:33:59 2018 UTC (5 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.86: +39 -64 lines
Diff to previous 1.86 (colored)

Adjust bgpctl to handle the community changes done in bgpd.
OK job@, phessler@

Revision 1.86 / (download) - annotate - [select for diffs], Wed Oct 3 11:36:39 2018 UTC (5 years, 8 months ago) by denis
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.85: +9 -1 lines
Diff to previous 1.85 (colored)

add filter option based on origin validation state

OK claudio@

Revision 1.85 / (download) - annotate - [select for diffs], Fri Sep 7 05:47:02 2018 UTC (5 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.84: +2 -1 lines
Diff to previous 1.84 (colored)

When parsing AS numbers set both as_min and as_max to the parsed value.
Not strictly needed but better to have both initialized.

Revision 1.84 / (download) - annotate - [select for diffs], Wed Sep 5 09:50:43 2018 UTC (5 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.83: +2 -2 lines
Diff to previous 1.83 (colored)

Adjust after change of struct filter_as.
OK phessler@

Revision 1.83 / (download) - annotate - [select for diffs], Wed Aug 29 19:52:23 2018 UTC (5 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.82: +2 -1 lines
Diff to previous 1.82 (colored)

Introduce 'bgpctl show rib error' to show all prefixes that got flagged
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@

Revision 1.82 / (download) - annotate - [select for diffs], Tue Jul 10 13:03:06 2018 UTC (5 years, 11 months ago) by benno
Branch: MAIN
Changes since 1.81: +2 -1 lines
Diff to previous 1.81 (colored)

Initialize the rtable in the requests send to bgpd to the current
rtables process. With this you dont need to add "table N" to commands
when talking to a bgpd not in rdomain 0.
ok claudio@ phessler@

Revision 1.81 / (download) - annotate - [select for diffs], Sun Oct 15 20:44:21 2017 UTC (6 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.80: +3 -1 lines
Diff to previous 1.80 (colored)

Add "ssv" variant which turns a rib route output into a single
semicolon-seperated line, so that grep and such can operate easier;
then use tr ';' '\n' to convert it to normal form later.  This helps
with scanning vast swathes of routes..
ok benno claudio job

Revision 1.80 / (download) - annotate - [select for diffs], Thu Aug 10 14:12:34 2017 UTC (6 years, 10 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.79: +260 -2 lines
Diff to previous 1.79 (colored)

handle extended communities in bgpctl.
From Dennis Fondras, thanks!
ok phessler@

Revision 1.79 / (download) - annotate - [select for diffs], Mon Jun 26 10:08:06 2017 UTC (6 years, 11 months ago) by phessler
Branch: MAIN
Changes since 1.78: +1 -5 lines
Diff to previous 1.78 (colored)

let admins set an unknown well-known community

from Job Snijders
ok phessler@ benno@

Revision 1.78 / (download) - annotate - [select for diffs], Mon Jun 26 10:05:57 2017 UTC (6 years, 11 months ago) by phessler
Branch: MAIN
Changes since 1.77: +7 -2 lines
Diff to previous 1.77 (colored)

add support for the "graceful shutdown" well-known community as described
in draft-ietf-grow-bgp-gshut

from Job Snijders
ok phessler@ benno@

Revision 1.77 / (download) - annotate - [select for diffs], Tue Feb 14 13:13:23 2017 UTC (7 years, 3 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.76: +13 -8 lines
Diff to previous 1.76 (colored)

fix a crash when parsing large community given on the command line
found by jsg@, fixed by phessler@ and strsep() by me.
fix memory leak jsg@
ok jsg@ phessler@

Revision 1.76 / (download) - annotate - [select for diffs], Mon Feb 13 14:48:44 2017 UTC (7 years, 3 months ago) by phessler
Branch: MAIN
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored)

draft-ietf-idr-shutdown extends to support a message on either of
"Administrative Shutdown" or "Administrative Reset"

patch submitted by Job Snijders, thanks!

Revision 1.75 / (download) - annotate - [select for diffs], Fri Jan 13 18:59:12 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.74: +22 -2 lines
Diff to previous 1.74 (colored)

Add support for draft-ietf-idr-shutdown

    BGP state = Idle, marked down with shutdown reason "goodbye, we are
    upgrading to openbsd 6.1", down for 00:00:17

developed by Peter van Dijk <peter.van.dijk@powerdns.com> and Job
Snijders <job@ntt.net>, thank you!

OK benno@

Revision 1.74 / (download) - annotate - [select for diffs], Fri Oct 14 16:05:35 2016 UTC (7 years, 7 months ago) by phessler
Branch: MAIN
Changes since 1.73: +84 -1 lines
Diff to previous 1.73 (colored)

Add support for draft-ietf-idr-large-community

Joint work with Job Snijders, many thanks!
OK benno@ deraadt@

Revision 1.73 / (download) - annotate - [select for diffs], Sun Oct 11 19:53:57 2015 UTC (8 years, 8 months ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.72: +6 -1 lines
Diff to previous 1.72 (colored)

Handle the blackhole well-known community in bgpctl as well (print it
symbolically, and don't deny its use in 'bgpctl sh rib comm 65535:6666').
ok phessler@

Revision 1.72 / (download) - annotate - [select for diffs], Sun Oct 11 19:21:44 2015 UTC (8 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.71: +2 -1 lines
Diff to previous 1.71 (colored)

add "best" as an alias for "selected"
Helps finger memory for people used to Junipers

OK benno@, claudio@

Revision 1.71 / (download) - annotate - [select for diffs], Mon Oct 5 14:18:33 2015 UTC (8 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.70: +1 -2 lines
Diff to previous 1.70 (colored)

these 3 files do not need sys/socket.h

Revision 1.70 / (download) - annotate - [select for diffs], Fri Apr 17 07:51:09 2015 UTC (9 years, 1 month ago) by phessler
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.69: +1 -3 lines
Diff to previous 1.69 (colored)

parse_prefix in parse.c got changed but the declaration in bgpctl.c
wasn't updated, so we would crash when doing `bgpctl net bulk` commands.

Fix by moving parse_prefix into a header, since we use it in more than
one file.

crash found by henning@
underlying problem found by blambert@

OK sthen@ deraadt@ claudio@ henning@

Revision 1.69 / (download) - annotate - [select for diffs], Wed Nov 19 21:11:41 2014 UTC (9 years, 6 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.68: +25 -22 lines
Diff to previous 1.68 (colored)

reduce redundant strlen calls by calling it once and saving the value

Revision 1.68 / (download) - annotate - [select for diffs], Sun Jan 5 20:53:56 2014 UTC (10 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (colored)

missing newline on error message

Revision 1.67 / (download) - annotate - [select for diffs], Wed Oct 9 08:56:38 2013 UTC (10 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.66: +11 -2 lines
Diff to previous 1.66 (colored)

Allow us to bulk add / delete routes with the same attributes.  Really
useful for distributing IP lists.

OK beck@, claudio@, henning@

Revision 1.66 / (download) - annotate - [select for diffs], Thu Mar 7 21:28:34 2013 UTC (11 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.65: +2 -1 lines
Diff to previous 1.65 (colored)

Implement a bgpctl nei foo destroy that will remove the specified cloned
neighbor. The neighbor must be set down before calling this function.
OK phessler

Revision 1.65 / (download) - annotate - [select for diffs], Sun May 27 18:53:50 2012 UTC (12 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.64: +2 -1 lines
Diff to previous 1.64 (colored)

Make it possible to load mrt table dumps into bgpd. This is a debug tool but
it  allows anyone to use MRT table dumps to load prefixes into a bgpd instance.
For example you can download the RIPE dumps and load full-feeds onto your
laptop until the poor thing dies.
OK henning@ sthen@

Revision 1.64 / (download) - annotate - [select for diffs], Tue Mar 27 18:24:11 2012 UTC (12 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.63: +2 -1 lines
Diff to previous 1.63 (colored)

Introduce "selected" as show rib attribute to only show selected routes.
Can be combined like: bgpctl show rib nei peer1 selected to only show
the routes that are used from neighbor peer1.
Requested by and OK deraadt@, OK henning@

Revision 1.63 / (download) - annotate - [select for diffs], Wed Sep 21 10:37:51 2011 UTC (12 years, 8 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.62: +67 -9 lines
Diff to previous 1.62 (colored)

Make it possible to parse MRT table dumps (all 3 formats) and display
them like the show rib / show rib detail output. It is also possible
to filter the output. e.g.
   bgpctl show mrt file ./bview.20110914.1600 as 22512 204.209.0.0/16 all
OK sthen@, put it in henning@

Revision 1.62 / (download) - annotate - [select for diffs], Mon May 3 13:11:41 2010 UTC (14 years, 1 month ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.61: +35 -10 lines
Diff to previous 1.61 (colored)

Adjustments for multiple kroute table support. This adds a few new command
arguments (show tables and show fib table 1, etc).
Tested by sthen@, OK to move on by henning@

Revision 1.61 / (download) - annotate - [select for diffs], Mon Mar 8 17:02:19 2010 UTC (14 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.60: +1 -2 lines
Diff to previous 1.60 (colored)

res.flags is not only used by the irrfilter so initializing them with
irrfilter flags is causing strange behaviour on other commands (like show fib).
Set the IPV4 and IPV6 flags at the end unless one of them got already set.
OK henning, sthen, deraadt

Revision 1.60 / (download) - annotate - [select for diffs], Wed Jan 13 06:04:00 2010 UTC (14 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.59: +11 -4 lines
Diff to previous 1.59 (colored)

Add VPNv4 to the understood address families in bgpctl.
OK henning@, reyk@

Revision 1.59 / (download) - annotate - [select for diffs], Sun Jan 10 00:16:23 2010 UTC (14 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.58: +3 -3 lines
Diff to previous 1.58 (colored)

ribreq uses now a AID, use AID also on the parsing side and convert to
AF when necessary. OK henning@

Revision 1.58 / (download) - annotate - [select for diffs], Tue Dec 1 14:29:40 2009 UTC (14 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.57: +6 -12 lines
Diff to previous 1.57 (colored)

Update code to use the new AID address ids so that this works again with
bgpd. Reads OK henning@

Revision 1.57 / (download) - annotate - [select for diffs], Mon Nov 2 20:38:45 2009 UTC (14 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.56: +9 -1 lines
Diff to previous 1.56 (colored)

Implement "log verbose" and "log brief" to enable or disable verbose debug
logging. henning, sthen, michele like the idea

Revision 1.56 / (download) - annotate - [select for diffs], Tue Sep 8 16:11:36 2009 UTC (14 years, 9 months ago) by sthen
Branch: MAIN
Changes since 1.55: +9 -2 lines
Diff to previous 1.55 (colored)

Add -4 and -6 flags to irrfilter mode, allowing you to only fetch (you
guessed it) v4 or v6 from the IRR.  Reduces size of the filter file (and
thus router resource use) when you only speak IPv4 but you want to
filter peers who announce lots of v6 space.  ok claudio@

Revision 1.55 / (download) - annotate - [select for diffs], Mon Aug 31 10:17:35 2009 UTC (14 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

Just use UINT_MAX as the maximum 4-byte AS number. It is good enough here.

Revision 1.54 / (download) - annotate - [select for diffs], Fri Jun 12 16:44:02 2009 UTC (15 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.53: +1 -28 lines
Diff to previous 1.53 (colored)

Kill copies of prefixlen2mask and inet6applymask their now in util.c

Revision 1.53 / (download) - annotate - [select for diffs], Sat Jun 6 06:05:41 2009 UTC (15 years ago) by claudio
Branch: MAIN
Changes since 1.52: +21 -1 lines
Diff to previous 1.52 (colored)

bgpctl part of allowing alternate RIBs to be shown. Had to use the
keyword table because show rib rib foo is strange.

Revision 1.52 / (download) - annotate - [select for diffs], Thu Apr 23 16:20:39 2009 UTC (15 years, 1 month ago) by sthen
Branch: MAIN
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored)

allow bgpctl and bgpd.conf to contain 32-bit ASN written in ASPLAIN
format (RFC5396). ok claudio@ henning@

Revision 1.51 / (download) - annotate - [select for diffs], Sun Aug 31 08:29:35 2008 UTC (15 years, 9 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored)

Fix AS check in parse_community() -- well-known communities have the AS
part set to COMMUNITY_WELLKNOWN which is the same as USHRT_MAX.
Figured out by Greg Skinner

Revision 1.50 / (download) - annotate - [select for diffs], Sun Jun 15 09:58:43 2008 UTC (15 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.49: +4 -2 lines
Diff to previous 1.49 (colored)

Fix minor mem leak in case parse_addr() fails.

Revision 1.49 / (download) - annotate - [select for diffs], Wed Jun 11 03:19:39 2008 UTC (16 years ago) by tobias
Branch: MAIN
Changes since 1.48: +5 -2 lines
Diff to previous 1.48 (colored)

getcwd can return NULL on error, so handle that case properly.

ok henning

Revision 1.48 / (download) - annotate - [select for diffs], Sat Jun 7 18:14:41 2008 UTC (16 years ago) by henning
Branch: MAIN
Changes since 1.47: +57 -7 lines
Diff to previous 1.47 (colored)

teach the command lineparser about getopt style options after commands
use that for irrfilter mode.
hints from theo a year ago, code by me a year ago, ok claudio a year ago

Revision 1.47 / (download) - annotate - [select for diffs], Sun Oct 14 22:12:31 2007 UTC (16 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.46: +2 -1 lines
Diff to previous 1.46 (colored)

do not fallthrough

Revision 1.46 / (download) - annotate - [select for diffs], Thu May 31 04:21:43 2007 UTC (17 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.45: +3 -1 lines
Diff to previous 1.45 (colored)

Use COMMUNITY_UNSET in bgpctl as well. This makes it possible to filter
on communities with 0 in them.

Revision 1.45 / (download) - annotate - [select for diffs], Mon May 28 20:09:21 2007 UTC (17 years ago) by henning
Branch: MAIN
Changes since 1.44: +4 -1 lines
Diff to previous 1.44 (colored)

parse_asnum must return 0 (no match) if word is not an as number instead
of bitching and erroring out.
worked so far because at the position it kicked in, only asnumor nothing
were allowed

Revision 1.44 / (download) - annotate - [select for diffs], Mon Apr 23 13:05:35 2007 UTC (17 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.43: +19 -8 lines
Diff to previous 1.43 (colored)

bgpctl needs to know about 4-byte AS numbers as well.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Apr 6 18:36:32 2007 UTC (17 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.42: +3 -2 lines
Diff to previous 1.42 (colored)

Implement "bgpctl show neighbor <peer> terse" this will print all statistics
in an easily parseable form. This output can be used to implement SNMP MIBs
or rrdtool/mrtg update scripts. OK henning@

Revision 1.42 / (download) - annotate - [select for diffs], Sat Mar 31 12:46:55 2007 UTC (17 years, 2 months ago) by henning
Branch: MAIN
Changes since 1.41: +4 -4 lines
Diff to previous 1.41 (colored)

some KNF, partially pt out by  rivo nurges <rix@estpak.ee>

Revision 1.41 / (download) - annotate - [select for diffs], Wed Mar 28 12:34:08 2007 UTC (17 years, 2 months ago) by henning
Branch: MAIN
Changes since 1.40: +11 -1 lines
Diff to previous 1.40 (colored)

add support for bgpctl show rib community <community>
mostly from rivo nurges <rix@estpak.ee>, ok claudio

Revision 1.40 / (download) - annotate - [select for diffs], Wed Mar 7 11:55:54 2007 UTC (17 years, 3 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.39: +2 -1 lines
Diff to previous 1.39 (colored)

support "bgpctl show rib peer-as NN", From: Armin Wolfermann <aw@osn.de>
ok theo

Revision 1.39 / (download) - annotate - [select for diffs], Sat Mar 3 11:45:30 2007 UTC (17 years, 3 months ago) by henning
Branch: MAIN
Changes since 1.38: +15 -1 lines
Diff to previous 1.38 (colored)

add irrfilter mode.
generates bgpd filter rules from the Internet Routing Registry aka IRR aka
the aut-num, as-set and route objects in the RIPE, ARIN, APNIC ... databases
accessed via whois, using the Routing Policy Specificaion Language RPSL.
implement the whois query interface, an RPSL parser (of course only the
parts we need), recursive as-set resolver, prefixes per AS lookup,
and an ouput module to make up the rules.
work in progress, not ready for general consumption yet.
import agreed by theo & claudio

Revision 1.38 / (download) - annotate - [select for diffs], Thu Feb 22 08:38:19 2007 UTC (17 years, 3 months ago) by henning
Branch: MAIN
Changes since 1.37: +3 -4 lines
Diff to previous 1.37 (colored)

minor KNF bits here too

Revision 1.37 / (download) - annotate - [select for diffs], Thu Feb 1 20:27:37 2007 UTC (17 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

Correct function name in err() message.

Revision 1.36 / (download) - annotate - [select for diffs], Wed Jan 31 09:12:24 2007 UTC (17 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.35: +29 -53 lines
Diff to previous 1.35 (colored)

Switch from strtoul() to strtonum() making the code easier to read.
OK henning@

Revision 1.35 / (download) - annotate - [select for diffs], Thu Jan 25 19:30:07 2007 UTC (17 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.34: +6 -4 lines
Diff to previous 1.34 (colored)

Correctly detect missing arguments. Same diff as in ospfctl. OK henning@

Revision 1.34 / (download) - annotate - [select for diffs], Wed Aug 23 08:21:11 2006 UTC (17 years, 9 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.33: +28 -8 lines
Diff to previous 1.33 (colored)

Extend show rib command. Following new options are added:
 in: show the unfiltered input of a neighbor aka adj-rib-in
 out: show only the prefixes that are sent to a specified neighbor (adj-rib-out)
 neighbor <IP>: limit the output of the command to prefixes sent by the
                specified neighbor

OK henning@ manpage with help by jmc@ but the show rib section needs some
rework because it starts to be confusing. Actually the parser needs to get
smarter.

Revision 1.33 / (download) - annotate - [select for diffs], Thu Jun 15 10:04:06 2006 UTC (18 years ago) by claudio
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

Move the PREFIX token to the end of the list. The other tokens are more
specific in what they match.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jun 14 17:06:44 2006 UTC (18 years ago) by claudio
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

Use inet_net_pton() instead of inet_pton() so that it is possible to use
10/8 as prefix. OK henning@

Revision 1.31 / (download) - annotate - [select for diffs], Fri May 26 05:07:15 2006 UTC (18 years ago) by henning
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

change keyword for route refresh request to just refresh, discussed with
claudio

Revision 1.30 / (download) - annotate - [select for diffs], Tue May 23 12:14:34 2006 UTC (18 years ago) by henning
Branch: MAIN
Changes since 1.29: +6 -5 lines
Diff to previous 1.29 (colored)

support requesting route refresh from a neighbor

Revision 1.29 / (download) - annotate - [select for diffs], Wed Mar 22 10:25:49 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.28: +2 -1 lines
Diff to previous 1.28 (colored)

Detailed RIB output including communities. Detailed output is enabled via
the "detailed" keyword. Currently only works for IP or prefix lookups like
"bgpctl show rib detail 199.185.137.3". Requested by many, looks good henning@

Revision 1.28 / (download) - annotate - [select for diffs], Thu Feb 9 16:08:28 2006 UTC (18 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

inet_pton() may return 1, 0 or -1. Only 1 is success so check explicitly
for it. OK henning@

Revision 1.27 / (download) - annotate - [select for diffs], Tue Jan 24 15:28:03 2006 UTC (18 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.26: +9 -2 lines
Diff to previous 1.26 (colored)

introduce "bgpctl show summary terse", shows summary in an easy to parse
format, intended for monitoring puposes. claudio ok

Revision 1.26 / (download) - annotate - [select for diffs], Tue Jan 3 22:51:14 2006 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.25: +2 -1 lines
Diff to previous 1.25 (colored)

Show RIB statistics via "bgpctl show rib mem".

Revision 1.25 / (download) - annotate - [select for diffs], Tue Jan 3 22:05:13 2006 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

Don't use fatal() and friend in bgpctl. The log system does not work here.

Revision 1.24 / (download) - annotate - [select for diffs], Fri Dec 30 23:13:44 2005 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.23: +2 -4 lines
Diff to previous 1.23 (colored)

Fix parse_prefix() for IPv4 addresses. Looks like fallout after IPv6 addition.
Now bgpctl show rib 129.128.5.191 works again.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Nov 29 20:41:30 2005 UTC (18 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

tabs on empty lines

Revision 1.22 / (download) - annotate - [select for diffs], Wed Nov 2 14:11:37 2005 UTC (18 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.21: +77 -14 lines
Diff to previous 1.21 (colored)

Add IPv6 support for the address and prefix parser. OK henning@

Revision 1.21 / (download) - annotate - [select for diffs], Tue Sep 20 14:40:32 2005 UTC (18 years, 8 months ago) by henning
Branch: MAIN
Changes since 1.20: +2 -1 lines
Diff to previous 1.20 (colored)

allow "show rib" to be limited to an address family too

Revision 1.20 / (download) - annotate - [select for diffs], Tue Sep 20 13:48:58 2005 UTC (18 years, 8 months ago) by henning
Branch: MAIN
Changes since 1.19: +2 -1 lines
Diff to previous 1.19 (colored)

for consistency, make "show network" and alias for "network show"

Revision 1.19 / (download) - annotate - [select for diffs], Tue Sep 20 13:47:08 2005 UTC (18 years, 8 months ago) by henning
Branch: MAIN
Changes since 1.18: +9 -2 lines
Diff to previous 1.18 (colored)

allow the "show network" output to be limited to a given address family

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jul 1 18:59:15 2005 UTC (18 years, 11 months ago) by fgsch
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.17: +6 -6 lines
Diff to previous 1.17 (colored)

fix breakage; if this proves to be wrong, will be fixed later. at least
make build will work now.

Revision 1.17 / (download) - annotate - [select for diffs], Thu Jun 16 18:43:00 2005 UTC (18 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.16: +12 -2 lines
Diff to previous 1.16 (colored)

use prefixlen2mask() instead of doing the bitshifting by hand; fixes the
zero prefixlen case (32 bit shift on 32 bit val -> undefined result)
spotted by Moritz Grimm and otto

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jun 7 17:43:06 2005 UTC (19 years ago) by claudio
Branch: MAIN
Changes since 1.15: +5 -8 lines
Diff to previous 1.15 (colored)

In case strlcpy() indicates that a string was truncated fail with errx().
No need for other strange constructs. OK henning@

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jun 6 17:13:56 2005 UTC (19 years ago) by henning
Branch: MAIN
Changes since 1.14: +20 -2 lines
Diff to previous 1.14 (colored)

add support for a "family" token, allows to select address families

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jun 5 00:23:23 2005 UTC (19 years ago) by henning
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

grr, more whitespace KNF, more carrot for claudio

Revision 1.13 / (download) - annotate - [select for diffs], Mon May 23 20:09:00 2005 UTC (19 years ago) by claudio
Branch: MAIN
Changes since 1.12: +322 -6 lines
Diff to previous 1.12 (colored)

Make it possible to dynamicaly add networks with attributes like communities
or metrics. Requested by beck@ OK henning@

Revision 1.12 / (download) - annotate - [select for diffs], Thu Dec 23 17:55:59 2004 UTC (19 years, 5 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored)

allo the "bgpctl show neighbor " commands to take the neighbor descr
too, claudio ok

Revision 1.11 / (download) - annotate - [select for diffs], Thu Dec 23 17:45:47 2004 UTC (19 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

must only try to match PEERDESC of nothing else matched, it's just a string
and will match almost everything...

Revision 1.10 / (download) - annotate - [select for diffs], Thu Dec 23 17:26:51 2004 UTC (19 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.9: +17 -3 lines
Diff to previous 1.9 (colored)

allow "bgpctl neighbor" to take the peer's descr as argument as well
as its address
so "bgpctl neighbor upstream1 clear" now works and you don't have to
remember IPs
claudio ok

Revision 1.9 / (download) - annotate - [select for diffs], Tue Oct 26 13:12:22 2004 UTC (19 years, 7 months ago) by henning
Branch: MAIN
Changes since 1.8: +8 -19 lines
Diff to previous 1.8 (colored)

ease the parser a bit.
parse() now wants the first argv member to be the first argument it parses,
i. e. it does not skip over argv[0] any more, caller has to account for that.
the caller does the usual getopt followed by argv += optind; argc -= optind;
dance so this is accounted for.
in parse() don't use a seperate curarg counter, just in/decrease argv/argc
claudio ok

Revision 1.8 / (download) - annotate - [select for diffs], Fri Aug 20 15:49:35 2004 UTC (19 years, 9 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.7: +2 -1 lines
Diff to previous 1.7 (colored)

add support for "bgpctl neighbor 1.2.3.4 clear", takes session down & up again
claudio ok

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jun 17 19:40:03 2004 UTC (19 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

print '<cr>' instead of '(nothing)' when we hit the end token in the
context-dependent usage help

Revision 1.6 / (download) - annotate - [select for diffs], Fri May 21 11:52:32 2004 UTC (20 years ago) by claudio
Branch: MAIN
Changes since 1.5: +17 -1 lines
Diff to previous 1.5 (colored)

Make it possible to add, delete, flush and show network announcements.
OK henning@

Revision 1.5 / (download) - annotate - [select for diffs], Thu Mar 11 16:34:21 2004 UTC (20 years, 3 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

typo

Revision 1.4 / (download) - annotate - [select for diffs], Tue Mar 2 19:32:43 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.3: +55 -2 lines
Diff to previous 1.3 (colored)

show rib A.B.C.D and show rib A.B.C.D/N [all] support. Now the most important
show commands are available. OK henning@

Revision 1.3 / (download) - annotate - [select for diffs], Thu Feb 26 16:19:58 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.2: +75 -5 lines
Diff to previous 1.2 (colored)

Implement "show rib" and "show rib <astype> <AS>" commands to dump the
RIB. OK henning@

Revision 1.2 / (download) - annotate - [select for diffs], Thu Jan 29 12:02:13 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

KNF

Revision 1.1 / (download) - annotate - [select for diffs], Wed Jan 21 23:45:18 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN

new parser.
completely table driven and not wired into the action code like the
previous parser...
i wanted to do this for some time, and now it was just due.

ok claudio@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.