summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/log.c
AgeCommit message (Collapse)Author
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-02-25we do have a table with suberror codes for cease and their meaning;Henning Brauer
use it, instead of always telling "unknown suberror code X" From: Leen Besselink <leen@consolejunkie.net> if memory serves, cease didn't have suberror codes defined in the original RFC 1771 and they were added later
2006-01-05Kill ENSURE(), remove ensure.h, say bye bye to fatal_ensure() andClaudio Jeker
one hip hip hooray from Henning.
2006-01-03Move functions shared with bgpctl into new file util.c. Simplifies theClaudio Jeker
link between bgpctl and bgpd mostly because of rde_attr.c.
2005-06-05make log_in6addr actually work correctly - it is astounding how ugly thingsHenning Brauer
are in the v6 world. the lower 16 bits of the scope ID are embedded in byte 3 and 4 of the address for link-local addresses... sometimes, at least. these btes have to be 0 by definition, so we need to fiddle the scope ID out and reset those bytes to 0. embedding the scopeID like that is the most disgusting hack I have seen in a while.
2005-05-27kroute6 support, at least partially. Get it in so that Henning can clean itClaudio Jeker
up more. OK henning@
2005-03-31zap some includes we don't need, Alexander von Gernler <grunk@pestilenz.org>Henning Brauer
2005-03-26proper check on log type. ok henning claudioTed Unangst
2004-11-18it's oupsa oupsa oupsa time...Henning Brauer
writing to a member of a const struct is no good, so un-const struct peer for log_statechange()
2004-11-18supress logging of subsequent connect() failures as long as:Henning Brauer
-the session alternates between Active and Connect. Other states reset logging -the error is the same as the last connect() error seen jajajaja claudio
2004-11-02supress logging of the (likely very long) repeated Connect -> Active ->Henning Brauer
Connect -> Active state changes, just clutters logs, claudio ok
2004-07-09let log_debug only log at all when we're in debug mode, from Montreal AirportHenning Brauer
2004-06-01I would have sworn I added tzset() hereHenning Brauer
2004-05-21move the big name tables to the .h file, makes the .c easierHenning Brauer
2004-05-08KNFHenning Brauer
2004-05-08provide log_sockaddr, which uses getnameinfo(), and use it inHenning Brauer
log_conn_attempt
2004-04-25spacesHenning Brauer
2004-04-25add "neighbor cloning", allowing you to specify a prefix and prefixlengthHenning Brauer
instead of the neighbor's IP address. WHen a connection comes in matching that mask we clone the neighbor spec. IPv6 match code by itojun, rde feeding by claudio, ok claudio
2004-04-25unbreak log_conn_attempt, bah crap crap crap crap crap crap crap crap crapHenning Brauer
2004-04-16make log_conn_attempt work in an address family independent matterHenning Brauer
2004-03-11fflush(stderr) in vlog if in debug mode, from discussion with and ok claudioHenning Brauer
2004-03-05new error code "unsupported capability" from RFC 3392Henning Brauer
2004-02-25use __progname instead of hardcoding bgpd for log_initHenning Brauer
2004-01-28KNFHenning Brauer
2004-01-27log_ntoa is herewith condemned to death by claudio and yours trulyHenning Brauer
2004-01-27constify log_addr and log_ntoa's returns, reminded by claudioHenning Brauer
2004-01-27use inet_ntop() for log_addr(), claudio okHenning Brauer
2004-01-27use a struct bgpd_addr instead of sockaddr_in for peer_config->local_addr andHenning Brauer
->remote_addr for easier multiprotocol support ok claudio@
2004-01-23provide log_addr, which takes a struct bgpd_addrHenning Brauer
intended to replace log_ntoa in most cases becaus that is IPv4 only by design
2004-01-22provide a log_debug and use it in rde.c.Henning Brauer
with this, logit() can be a private function. we don't need to include syslog.h in bgpd.h any more; log.c and parse.y who need it include it directly now.
2004-01-22make log_peer_* take a struct peer_config instead of the session engineHenning Brauer
specific struct peer, and move their prototypes to bgpd.h to make it available to whole bgpd ok claudio@
2004-01-22provide log_warnx() and log_info()Henning Brauer
2004-01-22log_peer_err -> log_peer_warnHenning Brauer
log_peer_errx -> log_peer_warnx
2004-01-22s/log_err/log_warn/Henning Brauer
it is like warn(3), nor err(3). so use a less confusing name.
2004-01-19(v)fprintf atomically in vlog() in debug mode, prodded by theoHenning Brauer
2004-01-062004Henning Brauer
2004-01-04share statenamesHenning Brauer
2003-12-30missing free()s; From: Patrick Latifi <pat@eyeo.org>Henning Brauer
2003-12-30typos from davidHenning Brauer
2003-12-26constify; ok henning@Jakob Schlyter
2003-12-26when this project started and i added the fatal() function, I made it takeHenning Brauer
the error number as parameter instead of accessing errno, because in one place the error number was not in errno but fetched from a socket. now, of course it makes much more sense to just set errno to the error number just fecthed in this one place instead of having hundreds of fatal() calls all transfer the errno round and round and round... fix this, and also provide a fatalx, which does not care for errno and doesn't invoke strerror. oh, btw, in the place where we fetch the err # from the socket, we don't call fatal anymore anyway...
2003-12-26provide a real log_errHenning Brauer
2003-12-26log_err -> log_peer_errHenning Brauer
log_errx -> log_peer_errx because that is what they really are, peer specific.
2003-12-26+ log_ntoa, a simple helper funtion that doesn't require a struct in_addr...Henning Brauer
2003-12-26remove he pathetic log_kroute()Henning Brauer
not used anywhere anyway
2003-12-24add log_kroute()Henning Brauer
2003-12-21little KNF inbetweenHenning Brauer
2003-12-20keep track which process we are so fatal() can log in which proc theHenning Brauer
condition happened. fatal()s from subsystems used by all 3 processes like the imsg subsystem were hard to track down without knowing in which process the condition happened.
2003-12-17styleHenning Brauer
2003-12-17welcome, bgpdHenning Brauer
started by me some time ago with moral support from theo, the proceeded up to the point where the session engine worked correctly. claudio jeker joined then and did a lot of work in the RDE. it is not particulary usefull as application right now as parts are still missing but is imported to enable more people to work on it. status: BGP sessions get established fine, OPEN messages and then KEEPALIVEs exchanged etc. session FSM works fine; NOTIFICATIONs are handled fine, and all connection drops etc I provoked get handled fine. Incoming UPDATE messgages are parsed well and the data entered to the RIB, the decision process is not yet there, neither is outgoing UPDATEs or sync to the kernel routing table. not connected to the builds yet.