summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/parse.y
AgeCommit message (Collapse)Author
2008-10-17bring in the findeol() fix from pfctl. list of affected parsers by sthenHenning Brauer
2008-07-08Use correct format string specifier for int argument. Don't try to print itClaudio Jeker
as string. Fixes crash seen by Peter Bristow. "obviously ok" henning@
2008-06-15Allow bgpd to delete more then one community per filter rule. Fixes PR5807Claudio Jeker
tested by Raphael Ho long time ago.
2008-02-26Have popfile() also close the main config file,Marco Pfatschbacher
but only do the final popfile call after yyparse() is done. This also fixes config reload on SIGHUP for some daemons. Spotted by otto@. OK deraadt@
2007-11-12Remove space/tab compression function from lgetc() and replaceMarco Pfatschbacher
it with a simple filter in the yylex() loop. The compression in lgetc() didn't happen for quoted strings, thus creating a regression when tabs were used in variables. Some testing by todd@ and pyr@ OK deraadt@
2007-10-20ntpd and bgpd's turn to behave like the others.Pierre-Yves Ritschard
ok henning@
2007-10-16Allow '=' to end a number in all lexers.Marco Pfatschbacher
Requested and OK deraadt@
2007-10-16in the lex... even inside quotes, a \ followed by space or tab shouldTheo de Raadt
expand to space or tab, and a \ followed by newline should be ignored (as a line continuation). compatible with the needs of hoststated (which has the most strict quoted string requirements), and ifstated (where one commonly does line continuations in strings). pointed out by mpf, discussed with pyr
2007-10-13in all these programs using the same pfctl-derived parse.y, re-unify theTheo de Raadt
yylex implementation and the code which interacts with yylex. this also brings the future potential for include support to all of the parsers. in the future please do not silly modifications to one of these files without checking if you are de-unifying the code. checked by developers in all these areas.
2007-10-11next step in the yylex unification: handle quoted strings in a nicer fashionTheo de Raadt
as found in hoststated, and make all the code diff as clean as possible. a few issues remain mostly surrounding include support, which will likely be added to more of the grammers soon. ok norby pyr, others
2007-09-13Move parser to use NUMBER as all other parse.y do know. A bit tricky becauseClaudio Jeker
all the relative metrics need some special handling. OK henning@ deraadt@
2007-05-31Init community in get_rule() to COMMUNITY_UNSET. get_rule() is called whenClaudio Jeker
set is used inside neighbor or group statements and the result was that these rules no longer machted everything. Problem found by Jon Morby. Please commit henning@
2007-05-31Even so some IX in germany likes to abuse 0 as AS community number we shouldClaudio Jeker
not allow anybody to use 65535. That one is reserved for well known communities. Add in that check again.
2007-05-28allow matching on communities using 0 in the AS part, that is in use.Henning Brauer
that unfortunately means we cannot use 0 for "unset". ok claudio
2007-04-23Make bgpd 4-byte AS compatible. All internal representations of AS numbersClaudio Jeker
are now 4-byte instead of the old 2-byte numbers. The only exception are communities because they can not be switched. The RDE will inflate and deflate the ASPATH and AGGREGATOR attributes on demand and create the NEW_ASPATH and NEW_AGGREGATOR field whenever needed. Both old and new stile sessions are supported and can be mixed. Currently new stile sessions with the 4-byte AS number capability turned on are only enabled if one of the AS numbers involved is a 4-byte one. This is based on an initial diff by Geoff Huston gih (at) apnic (dot) net Cleanup, testing and bug-fixes by myself (via AS 3.10). Currently mrt table dumps are producing incompatible output this will be fixed afterwards -- this diff is already big enough. "get it in if you think it is ready" henning@
2007-04-17Make "network inet connected" work again. inet and inet6 became keywordsClaudio Jeker
some time ago. OK henning@
2007-03-29Until now prefixlen defaulted to AF_INET if it was used without a prefix.Claudio Jeker
This makes prefixlen filtering for AF_INET6 unnecessary complex. From now on if prefixlen is used alone the address family needs to be specified beforehands via the new inet or inet6 keywords. Remove an old check so that it is finally possible to filter IPv6 prefixes. OK henning@
2007-03-06allow filtering on peer-as (leftmost AS in path), ok claudioHenning Brauer
2007-02-22KNFHenning Brauer
2007-01-26AS 65535 aka USHRT_MAX is reserved and may not be used so adapt theClaudio Jeker
range check. Found while hacking on 4-byte AS support.
2006-12-05implement the ttl security hack. since the pc slaves fear the word hack,Henning Brauer
they call it "Generalized TTL Security Mechanism" officially, RFC 3682. manpage with help from jmc
2006-11-28allow bgpd to work on alternate routing tables, claudio ok, jmc manpage helpHenning Brauer
2006-10-25use strtonum, Pierre-Yves Ritschard <pyr@spootnik.org>Henning Brauer
2006-09-19save the parser state in one big struct, and make it interchangable, akaHenning Brauer
make the parser restartable. with that implement "include" file support. makes life a _lot_ easier with filter generation tools. claudio ok
2006-09-19kill useless debug code that somehow snuck in, some 2 years ago...Henning Brauer
2006-08-27add code to announce the restart capability according toHenning Brauer
draft-ietf-idr-restart. Do not announce actual restart capabilities, so that this only serves as indicator that we are capable of sending and receiving the End-of-RIB marker. leave disabled for now, since the code to actually send the EoR-marker is currently ifdef'd out (to be fixed soon) and we wanna play safe for 4.0. and juniper doesn't support that capability (which is not a problem per se) and at the same time has its capability negotiation code completely fucked up, if a capability is rejected they don't indicate WHICH capability they reject (which makes that a problem, tho still a small one and we cope). claudio ok
2006-08-04add "restart" to max-prefix, allows sessions suspended due to reachingHenning Brauer
max-prefix to be restarted automagically after a given number of minutes requested by "Sylwester S. Biernacki" <obeer@obeer.com>, manpage help jmc, ok claudio
2006-06-17implement carp demotion control for bgpd.Henning Brauer
sessions can be configured to modify the carp demotion counter for a given interface group (usually, "carp", which has all carp interfaces) when the session is not established. once the session is established for 60 seconds, the demotion is cleared. this, used correctly, can prevent a bgpd-box which lost all sessions (and thus has no routes) to be carp master, while the backup has sessions. thought through and partially hacked on a drive from calgary to vancouver with ryan, ok claudio
2006-05-31Plug memory leaks in error path; ok henning@Patrick Latifi
2006-05-26\<char> is <char> except for \<newline> -- no exceptions. much like howTheo de Raadt
other things work. ok henning
2006-04-26Remove filterset_names from bgpd.h and replace it with a function becauseClaudio Jeker
the table was already out of sync now. OK henning@
2006-04-18cannot see the string self in the ANNOUNCE STRING prod any more sinceHenning Brauer
self is a token now
2006-04-18Fix "announce self" that got broken by "nexthop self". Found by Thomas Bader.Claudio Jeker
OK henning@
2006-04-04add "set nexthop self", force nexthop to be set to own address even with IBGPHenning Brauer
requested & tested Falk Brockerhoff <fb@smartterra.de>, and tony sarendal tested this too. claudio ok
2006-03-22Change the way bgpd selects nexthops. Up until now every route was consideredClaudio Jeker
when calculating the nexthop. Now only non BGP routes and not the default route are used unless forced with the new config options nexthop qualify via bgp nexthop qualify via default This change is required for complex setups e.g. where an additional IGP is running. OK henning@
2006-03-07Fix a bug reported by Xavier Beaudouin. On config reloads set parametersClaudio Jeker
inside group blocks were reset to default values. The problem was that group ids changed on reload as soon as a new peer was added to one group. Make sure that group ids remain the same over reloads a similar thing is already done for peer ids. ok henning@
2006-03-04Typos grab bag of the month, eyeballed by jmc@Miod Vallat
2006-02-10Make it possible to turn suftreconfig in/out on or off. Default is on forClaudio Jeker
both directions. Manpage update follows. OK henning@
2006-02-09Implement "set community delete 65001:*" and friends. This will removeClaudio Jeker
communities from the path attributes. Useful to make sure that the ones you set later are set by a (evil) peer. OK henning@
2006-02-02Implement new special community "neighbor-as". neighbor-as is expanded onClaudio Jeker
the fly to the remote AS of the current neighbor. This can be used to simplify rulesets in a dramatic way -- going from a script based nightmare down to a handfull rules. jajajaja henning@
2006-01-07Add COMMUNITY_NO_PEER to the list of known wellknown communities else itClaudio Jeker
is not possible to use NO_PEER as community in the config.
2005-11-29superfluous ; OK henning@Claudio Jeker
2005-11-01Sort filter_set with equal type as well. This affects communityClaudio Jeker
attributes and set nexthop. Now the full filter set list is sorted.
2005-11-01Relative metrics should be stored in relative and not metric. The oneClaudio Jeker
is singed the other not.
2005-11-01Make sure, that the list of filter_sets is ordered. Makes comparing easier.Claudio Jeker
2005-11-01Switch from the per peer filter set list to a filter-only solution.Claudio Jeker
The default filter_sets are converted into match filter rules that get evaluated first. Simplifies code massively -- mainly the config reload part -- and makes softreconfig out a piece of cake. "get it in" henning@
2005-10-19new keyword "down" in neighbor spec, when givenm, the session is notHenning Brauer
started on bgpd startup but stays in IDLE. requested by claudio
2005-08-09Introduce new route decision tunable "rde med compare (always|strict)".Claudio Jeker
If set to always the med will also be compared between different AS. The default is strict which is the way the RFC specifies it. OK henning@
2005-07-28keywords have to be sorted, and I can't sort properlyHenning Brauer
2005-07-28allow the to be announced SAFIs to be specified per peer, that is part of theHenning Brauer
multiprotocol shitz claudi needs this to proceed with v6 stuff in the RIB, print stuff and manpage later from whatthehack, claudio ok, marcm schnell schnell schnell