summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/session.h
AgeCommit message (Collapse)Author
2006-01-24introduce a second control socket, which is restricted to certain messages,Henning Brauer
nameley the show ones. needed for looking glass style applications, monitoring etc. claudio ok
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-10-19on "bgpctl neighbor foo clear", we used to send a STOP event immediatelyHenning Brauer
followed by a START event. Instead of sending START immediately, start the IdleHoldTimer with a very low value (5 seconds) so that we restart the session these seconds later. some other implementations deal poorly with our previously superfast reconnects, namely, that commercial one from san jose, claudio ok
2005-09-19implement fast reconnectsHenning Brauer
when a peer drops to IDLE, we have to force him in IDLE for some time to prevent fast flapping. however, the forced idle time is annoying when the connection could be re-established immediately, i. e. bgpctl nei $peer clear or similar. implement an error counter per peer, increased every time we receive a notification. when we are in state IDLE and get a connection from the peer in question, check if the error counter is 1 or smaller. if so, change state to active and accept the connection, otherwise keep the current behaviour and reject the connection. the error counter gets scaled back by the IdleHoldResetTimer that scales the IdleHoldTime back as well
2005-06-04when sending out a notification record the error code and suberror code inHenning Brauer
the peer stats struct, and clear them as soon as the session leaves IDLE
2005-04-05magic police, Jason Ackley <jason@ackley.net>Henning Brauer
2004-12-23introduce getpeerbydesc(), find a peer by its descriptionHenning Brauer
2004-12-23lower latency by processing no more than 25 messages at once for each peerHenning Brauer
2004-12-23sort structs for most optimal alignment, help mickey, claudio okHenning Brauer
2004-11-18add an instance of struct capabilities to peer_conf, and inheritHenning Brauer
peer->capa.ann from this
2004-11-18inside struct peer, replace the occurance of the older struct peer_capaHenning Brauer
by two instances of the new struct capabilities, one for announcements and one for the received capabilities
2004-11-18remove the global 'announce' flag from struct peer_capa, clearHenning Brauer
individual capability flags where needed
2004-11-18struct capa_mp is not needed any more, spotted by claudioHenning Brauer
2004-11-18add code to announce support for IPv6 Unicast.Henning Brauer
disabled for now, claudio ok
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-02save the previous state in struct peer, claudio okHenning Brauer
2004-10-19allow neighbor definitions to depend on interface state.Henning Brauer
with this, if a neighbor is configured as dependent on carp0 for example, the neighbor will remain in state IDLE as long as carp0 is not master. once carp0 becomes master the session(s) depending on it immediately go to CONNECT (or ACTIVE, if they're configured passive), reducing failover time. claudio ok, with some input from ryan as well
2004-09-22don't bother shrinking the pfd and index2peer arraysHenning Brauer
ok claudio
2004-09-16when a cloned peer goes back to IDLE state, don't remove him immediatelyHenning Brauer
but keep him around for some more time (an hour here). fixes an issue Arvid was reporting: when a cloned neighbor rejects our OPEN message due to capability negotiation (or missing implementation of those), we set a marker and retry without. However, if we remove the peer immediately, it gets freshly cloned on the next trial, with default settings, thus including capability negotiation, and thus failes again. this will also help with route flap dampening. ok claudio
2004-08-06Forward IMSG_CTL_SHOW_NEIGHBOR messages to the rde so that we can reportClaudio Jeker
the current and max prefix count back to bgpctl. OK henning@
2004-08-05The peer_l is not needed in the rde but still allocated, free them andClaudio Jeker
save 1k per peer. OK henning@
2004-08-04session_main() and rde_main() return... right, a pid. and a pid is a pid_tHenning Brauer
and not an int.
2004-07-042 more file descriptors for each RDE and SE inherited from the parentHenning Brauer
we should close
2004-06-20at least somewhat consistently name the TAILQ_ENTRYs... this confused meHenning Brauer
more than once
2004-06-20implement file descriptor passing in the imsg/msgbuf framework, and useHenning Brauer
it to let the main process to prepare new listening sockets (socket() and bind()) on behalf of the session engine, which of course cannot bind() to ports < 1024 any more once it dropped privileges. with some help from theo, claudio ok
2004-06-09move to a dynamically allocated struct pollfd array.Henning Brauer
we used a ststic one with OPEN_MAX entries, which is a rather arbitary limit as OPEN_MAX is _not_ the max # of open fds we can have, but just a default for that setting. in the same move we have to allocate the peer_l array, basically there for pfd-index to peer pointers to prevent peer list scans all time, dynamiccaly to. we overallocate a little and use that reserve until we have to realloc again later to prevent reallocs for every single control connection or a single flapping peer. help & ok claudio
2004-06-06rework bgpd's handling of listening sockets. instead of one for eachHenning Brauer
supported address familiy, keep a tailq of an arbitary number of them. the new struct listen_addr contains the sockaddr and the fd. this fixes quite some nasty behaviour which was a consequence of the previous model. looks right deraadt@, and discussed with claudio
2004-05-28detect absence of PF_KEY interface and/or the TCP_MD5SIG setsockoptsHenning Brauer
at runtime and disable said subsystems if so. helps the guys porting bgpd to $otherBSD, and is actually the right thing to do. claudio ok
2004-05-08provide log_sockaddr, which uses getnameinfo(), and use it inHenning Brauer
log_conn_attempt
2004-05-08remove unused argument to control_dispatch_msg(), lintHenning Brauer
2004-04-28rename sock to fdTheo de Raadt
2004-04-28if a peer follows the extremely misgiuded path that the RFCs just barely allowHenning Brauer
to send a NOTIFICATION and thus ternminating the session when it sees a capability it doesn't support (who would guess: zebra does so), parse the data section of the notifcication to find out what what capabilties it didn't like and do not advertise them the next time the session gets up. In case we get a notification about unsupported capabilities with an empty data part (don't ask for RFCs... and guess who does that), disable capabilty announcement alltogether. claudio ok
2004-04-28keep track of which ipsec/md5 SAs we inserted - ESRCH on blind removalHenning Brauer
otherwise, markus ok
2004-04-27rename the ipsec struct to auth, move all tcpmd5 related fields in there, andHenning Brauer
add a generic "method" field that expresses what method (none/md5sig/ipsec manual/ipsec ike) is in use markus ok
2004-04-27initial route refresh support per RFC2918Henning Brauer
process incoming route refresh request and notify the RDE not advertised via capabilities yet, claudio ok
2004-04-26load ipsec SAs into the kernel and enable them.Markus Friedl
2004-04-26announce multiprotocol capabilities - IPv4 multicast for nowHenning Brauer
this implies ourgoing capabilities annoucnement is there and just needs the values to be filled in for other shitz we'll support soonish
2004-04-25Remove the no longer needed configure stuff in RDE. The peer list needs noClaudio Jeker
longer to be synced between parent, SE and RDE. OK henning@
2004-04-16let getpeerbyip work for both v4 and v6Henning Brauer
2004-04-16make log_conn_attempt work in an address family independent matterHenning Brauer
2004-04-13parse the BGP Multiprotocol Extensions (RFC 2858) capabilities and store inHenning Brauer
the peer struct, claudio ok
2004-03-11Shutdown the RDE cleanly on exit. Plug some memleaks. OK henning@Claudio Jeker
2004-03-11Free unneeded mrt lists in SE and on exit. OK henning@Claudio Jeker
2004-03-10pass a pointer to the network list as well to session_main so we can free()Henning Brauer
the members after fork
2004-03-10pass a pointer to the filter rule list to session_main() so we can free()Henning Brauer
the list entries and the head there after forking
2004-03-10implement framework to announce capabilities in the open messages we send.Henning Brauer
this includes handling "unsupported optional parameter" notifications from the peer and retrying without capability announcement. claudio ok
2004-03-05new error code "unsupported capability" from RFC 3392Henning Brauer
2004-03-05add a parser for the capability announcements using the OPEN message as perHenning Brauer
RFC 3392. we don't support any capability yet but this at least avoids one session teardown and reestablishment when talking to peers which do support capability announcement (as in: basically any) and we'll start supporting some soon.
2004-03-01Forgotten in the last commit. Sync printconfig and parser.Claudio Jeker