summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpctl
AgeCommit message (Collapse)Author
2007-04-06Implement "bgpctl show neighbor <peer> terse" this will print all statisticsClaudio Jeker
in an easily parseable form. This output can be used to implement SNMP MIBs or rrdtool/mrtg update scripts. OK henning@
2007-04-06Include update statistics in the bgpctl show neighbor output.Claudio Jeker
2007-03-31some KNF, partially pt out by rivo nurges <rix@estpak.ee>Henning Brauer
2007-03-28add support for bgpctl show rib community <community>Henning Brauer
mostly from rivo nurges <rix@estpak.ee>, ok claudio
2007-03-16Missed to remove SAFI_BOTH here. Informed about it by Steven Mestdagh.Claudio Jeker
2007-03-07support "bgpctl show rib peer-as NN", From: Armin Wolfermann <aw@osn.de>Henning Brauer
ok theo
2007-03-06prepare, but leave disabled, verbose operation so that you can see what isHenning Brauer
going on (helps when the damn thing runs for hours). will be enabled with a -v somewhen in the future
2007-03-06another completely bogus route entry, this time openface in their own RR:Henning Brauer
route: 198.73.251.0 no prefixlen... overhaul error handling in prefixset_addmember(). for prefixes without prefixlen or ones where inet_net_pton reports an invalid format, complain and ignore the prefix, but don't err out completely.
2007-03-05RPSL spec says route: is single-valued... nontheless, in the APNIC db:Henning Brauer
route: 203.94.216.0/21, origin: AS17813 so we need to cut trailing ',' away
2007-03-05better diagnostics on inet_net_pton failingHenning Brauer
2007-03-05correctly deal with hierarchical as-set names.Henning Brauer
everything we run into as members that is hierarchical (contains :) has to be an as-set. RPSL requires one component to have the AS- prefix; we check that. now the huge AS-TELIANET correctly resolves - into 15128 unique ASes, takes 12m47.11s real 0m8.62s user 0m1.07s system
2007-03-05convert all members of an as-set to uppercase on the fly.Henning Brauer
do the same in asset_expand() for the head as-set or aut-num reference from the policy. fixes duplicate ASes with mixed case seen after set resolution and saves some str(n)casecmp on the way (or rather allows a whole bunch of strcmp to stay)
2007-03-05KNFHenning Brauer
2007-03-05need to eat whitespace at both ends of valHenning Brauer
2007-03-05KNFHenning Brauer
2007-03-05gremlins keep putting tiny KNF violations in my code in the hope I don'tHenning Brauer
spot 'em
2007-03-05better error msgHenning Brauer
2007-03-05loop over the list calling prefix_aggregate until nothing can be aggregatedHenning Brauer
any more. since aggregated entries might be further aggregatable... shaves of another 1200 lines (of ~16900) from the generated ruleset for my AS
2007-03-05lint happinessHenning Brauer
2007-03-05unused vars, lintHenning Brauer
2007-03-05in prefix_aggregate(), when we look at two neighbor prefixes, see wetherHenning Brauer
they can be expressed as one with shorter prefixlen. if so, adjust the first prefix accordingly and return 1 so the second gets removed. shrinks the ruleset for my AS from 19533 to 16892 rules.
2007-03-05do the prefix masking in network byte orderHenning Brauer
2007-03-05sort out more specifics and mark the less specific covering them in a wayHenning Brauer
that the resulting rule allows more specifics. i. e. 10.0.0.0/16, 10.0.1/24, 10.0.128/17 -> prefix 10.0.0.0/16 prefixlen <= 24 implementation: sort prefixes per AS by address family, prefix, prefixlen. for every entry, check wether the prefix with the previous entry's mask applied matches the previous entry's prefix & mask. Only move the previous pointer forward if not so. Fill the holes we create in the process on the fly; shrink the array afterwards. shrinks the generated filters for our AS from over 100k to under 20k lines.
2007-03-05switch to whois.radb.net. The RIPE whois server shows problems, indefinatelyHenning Brauer
hanging connection for a specific query (which works find against radb, investigating with ripe pplz), and ripe doesn't mirror some important RRs like ALTDB.
2007-03-05store a maxlen with each prefix. if that is set, this prefix coversHenning Brauer
multiple route objects (i. e. is the result of maksing out longer prefixes or aggregation we'll do later). if maxlen is > prefixlen, generate rules accordingly (prefixlen <= maxlen)
2007-03-05prevent re-use of shit in pbuf from previous rulesHenning Brauer
2007-03-04correct include orderTheo de Raadt
2007-03-04rename struct prefix -> irr_prefixHenning Brauer
2007-03-04store prefixes in binary format. we'll need that for aggregation.Henning Brauer
discussed with pyr
2007-03-04for import rules, filter by source-as tooHenning Brauer
2007-03-04store peer AS numericallyHenning Brauer
2007-03-04pass pointer to struct policy_item down to print_rule() instead of 3 of itsHenning Brauer
members
2007-03-04fix output format. spent too much time with RPSL...Henning Brauer
2007-03-04fix cass where the specification does not give the router address by usingHenning Brauer
"" instead of defaulting to NULL, which is a pain to handle afterwards. in the output function, treat empty string address like NULL address problem noticed by rivo nurges <rix@estpak.ee>
2007-03-04ran into an asset which has dangling , at eol in the member spec, leadingHenning Brauer
to us trying to add an empty-string AS, which asset_get later complains about. in parse_asset, check that we're no dealing with a empty string token before calling asset_addmember
2007-03-03sort; ok henningJason McIntyre
2007-03-03as-sets always begin with AS-, and aut-nums with AS[0-9], mandated by theHenning Brauer
RPSL spec and enforced by the IRR databases. teach asset_get this fact. only send queries for the as-set members for as-sets. since we now always fake an as-set for aut-nums, we don't need to escape the recursive as-set resolution process when we run into aut-num members. complain about and then ignore unresolvable as-set members.
2007-03-03make parse_response (and thus whois) return 0 for no object found, and n+1Henning Brauer
for object found with n matched attributes. this way we can distinguish between no object found and object without relevant attributes
2007-03-03start documenting irrfilter modeHenning Brauer
2007-03-03allow the directory for generated filter files to be set. defaults to cwdHenning Brauer
2007-03-03write output to files instead of stdoutHenning Brauer
2007-03-03add irrfilter mode.Henning Brauer
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
2007-02-22minor KNF bits here tooHenning Brauer
2007-02-02Print neighbor templates with a state of Template. Makes the differenceClaudio Jeker
between templates and real sessions more obvious. OK henning@
2007-02-01Correct function name in err() message.Claudio Jeker
2007-01-31Switch from strtoul() to strtonum() making the code easier to read.Claudio Jeker
OK henning@
2007-01-27Make sure that the graceful restart capability is printed in any case.Claudio Jeker
The printf() was only reachable if one of the other capabilities were set.
2007-01-25Correctly detect missing arguments. Same diff as in ospfctl. OK henning@Claudio Jeker
2006-12-12Xr bgplg and bgplgsh;Jason McIntyre
2006-11-28add additional link states to report the half duplex / full duplexReyk Floeter
state, if known by the driver. this is required to check the full duplex state without depending on the ifmedia ioctl which can't be called in the kernel without process context. ok henning@, brad@