summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd
AgeCommit message (Collapse)Author
2013-07-04some very minor tweaking;Jason McIntyre
2013-06-05Fix build on vaxMiod Vallat
2013-06-04I screwed up and forgot to commit this new file :(Claudio Jeker
2013-06-04tweak previous;Jason McIntyre
2013-06-04Speed-up the session establishment processClaudio Jeker
* Send an extra Hello message before attempting to connect to a remote peer to guarantee that it formed an adjacency with us as well; * Don't wait for the first timeout to send the first Hello message. Both tricks together will allow for fast session establish since with both optimizations passive role neighbors can open the connection immediatly by sending and receiving the hellos at the same time as the TCP session. From Renato Westphal
2013-06-04Always accept TCP connection requests and identify to which neighborClaudio Jeker
it belongs only _after_ receiving an Initialization message containing the information we need. Before an Initialization message is received, the TCP connection shouldn't be associated with any neighbor/adjacency. Therefor refactor that part into a own module. From Renato Westphal
2013-06-04Tiny typo. "Just commit" -- claudio@Ian Darwin
2013-06-04Cleanup ctl commands and remove unused variables inherited from ospfdClaudio Jeker
From Renato Westphal
2013-06-04Implement support for adjacencies and targeted hellosClaudio Jeker
Refactor adjacencies out of the neighbor handling so that it is possible to have more complex topologies with targeted sessions. From Renato Westphal
2013-06-04Properly implement the exponential backoff timer on session initializationClaudio Jeker
According with the section 2.5.3 of RFC 5036, an LSR must throttle its session setup retry attempts with an exponential backoff in situations where Initialization messages are being NAK'd (because of disagreements on session parameters). It doesn't mention using this procedure for TCP connection failures. With that said, start the inactive delay timer only after receiving an appropriate notification message. When playing the active role of the initialization process, throttle the session setup retry attempts by not connecting to the remote peer. When playing the passive role, throttle the session setup retry attempts by delaying the processing of the received Initialization message. Diff by Renato Westphal, adjusted by myself
2013-06-04Minor adjustments in the initialization FSMClaudio Jeker
* Remove the unused NBR_EVT_DOWN event; * Print the FSM transitions before performing the appropriate actions. In this way nested calls to nbr_fsm() won't print the state transitions in reverse order; * When playing the active role of the initialization process, transition from NBA_STA_PRESENT to NBR_STA_INITIAL before going to NBR_STA_OPENSENT; * Call session_shutdown() on nbr_ktimeout() to remove duplicated code; * Notify the lde process when a neighbor is deleted (discovery timeout); * Fix a few memory leaks on nbr_del(). Diff from Renato Westphal.
2013-06-04Minor adjustments in the startup of the lde and ldpe processesClaudio Jeker
The 'ldpd_process' variable should be set as soon as possible in the initialization of each process. In that way if something goes wrong in the initialization we will know in which process the problem happened. Diff by Renato Westphal
2013-06-04fix some minor issues before proceeding with the remaining patches fromClaudio Jeker
Renato Westphal. Diff by Renato Westphal
2013-06-03Remove the IMSG_NEIGHBOR_CHANGE messageClaudio Jeker
Unlike OSPF, LDP has no concept of intermediate states. A session is either operational or not operational as far as the label distribution engine (lde) is concerned. In this case, the IMSG_NEIGHBOR_UP and IMSG_NEIGHBOR_DOWN messages are enough. Diff by Renato Westphal
2013-06-03Fix bug in the fib-update commandClaudio Jeker
The "fib-update" directive wasn't accepting "no" as an option. Diff by Renato Westphal
2013-06-03Advertise the implicit-null label for routes attached to loopbackClaudio Jeker
interfaces to guarantee PHP. With this 'fib-update no' is not totaly broken because of missing mappings for the loopbacks. Diff by Renato Westphal
2013-06-03Implement support for multiple addresses per interface.Claudio Jeker
This replaces the way addresses and interface are chained together. In ospfd there was a 1 to 1 mapping (with iface clones) but LDP does not have that limitation. Diff from Renato Westphal
2013-06-01Filter out route messages we don't need and log kernel messages inClaudio Jeker
super verbose mode. From Renato Westphal
2013-06-01zap extra .Pp;Jason McIntyre
2013-06-01Restart the keepalive timer whenever a LDP PDU is sent. There is no needClaudio Jeker
to send a keepalive packet when a other PDU was sent out. Also add a missing NBR_EVT_PDU_RCVD call to recv_address() which restarts the session keepalive timeout. All other places already do that. Diff by Renato Westphal
2013-06-01The keepalive timeout should be configured on a global basis and not perClaudio Jeker
interface. Remove the iface pointer from the 'nbr' structure because it's not needed anymore. Diff from Renato Westphal
2013-06-01Improve error handling on session_readClaudio Jeker
* Don't try to send a Shutdown message if the connection is already closed or a read error occured; * As per RFC 5036, send a Shutdown message if an unexpected message is received during the initialization process; * Check if the whole LSR ID of received messages is correct; * On ldpe_dispatch_main(), ignore the messages from the lde process whose associated neighbor is not in the operational state. Diff from Renato Westphal
2013-06-01Drop support for per-interface labelspaces.Claudio Jeker
Support for per-interface labelspaces is only necessary for legacy ATM/FR interfaces running in cell-mode. We shouldn't worry about this. For platform-wide label spaces the label space id is always 0. Diff by Renato Westphal
2013-06-01Drop support for passive interfaces.Claudio Jeker
Support for passive interfaces was inherited from ospfd but it doesn't make any sense at all for ldpd. Diff from Renato Westphal
2013-06-01A bit nicer error message.Claudio Jeker
2013-06-01Don't allow enabling LDP on loopback and carp interfaces.Claudio Jeker
LDP should be allowed only on physical or tunnel interfaces. Diff by Renato Westphal
2013-06-01Use the nbr_stop_[*]timer functionsClaudio Jeker
Diff from Renato Westphal
2013-06-01After sending a keepalive message in the OPENSENT state, we must move toClaudio Jeker
the OPENREC state and wait for a keepalive before considering the session as established Another bug fix by Renato Westphal
2013-06-01After returning from accept, we got a TCP connection not a LDP session.Claudio Jeker
Rename event/actions in the discovery FSM to avoid confusion * NBR_EVT_SESSION_UP -> NBR_EVT_CONNECT_UP * NBR_ACT_SESSION_EST -> NBR_ACT_CONNECT_SETUP * nbr_act_session_establish -> nbr_act_connect_setup * NBR_ACT_INIT_SEND -> NBR_ACT_PASSIVE_INIT * NBR_ACT_STRT_KTIMER -> NBR_ACT_SESSION_EST Diff by Renato Westphal
2013-06-01Don't set the Message ID for hello messages.Claudio Jeker
The Message ID field is used by notification messages to identify a given message. This is the behavior adopted by Cisco IOS. Diff from Renato Westphal
2013-06-01Always advertise the Router-ID as the transport address.Claudio Jeker
RFC 5036 - Section 2.5.2 says: An LSR MUST advertise the same transport address in all Hellos that advertise the same label space... To satisfy this condition, always advertise the Router-ID as the transport address by using the "IPv4 Transport Address" TLV in the generated Hello messages. From Renato Westphal
2013-05-31Remove unused definitionsClaudio Jeker
Diff from Renato Westphal [renatowestphal at gmail.com]
2013-05-31When the ldpe process calls connect(), it doesn't regain control untilClaudio Jeker
either the connection is made or an error occurs. The time the process is blocked can be significantly large to the point of other LDP sessions being torn down because of their holdtime. Besides that, the ldpctl program gets unresponsive if the ldpe process is blocked. Fix these issues by using a non-blocking connect. Diff from Renato Westphal [renatowestphal at gmail.com]
2013-05-30Fix bug when starting ldpd with a configured interface in the down state.Claudio Jeker
If a given interface is down at startup, don't promote it to the ACTIVE state. Diff from Renato Westphal [renatowestphal at gmail.com]
2013-05-30Stop trying to send hello messages if the interface is down.Claudio Jeker
Diff from Renato Westphal [renatowestphal at gmail.com]
2013-05-30Simplify hello holdtime calculation and stop the timeout timer if theClaudio Jeker
holdtime is "infinite". Diff from Renato Westphal [renatowestphal at gmail.com]
2013-05-30Improve sanity checks on received UDP messagesClaudio Jeker
The actual meaning of the "PDU Length" field is the total length of the LDP PDU, excluding the "Version" and "PDU Length" fields (as per RFC 5036, section 3.1). Diff from Renato Westphal [renatowestphal at gmail.com]
2013-05-30Do not use a carp address as ldp router id because it is not unique.Claudio Jeker
Pulled from ospfd. Diff from Renato Westphal [renatowestphal at gmail.com]
2013-05-23.Xr mpe and ldpd for interested parties. ok deraadtTed Unangst
2013-05-04fix a use after freeJonathan Gray
ok sthen@ jung@ fgsch@
2013-03-11handle ECONNABORTED errors from accept(). In many code blocks they can beTheo de Raadt
ignored silently and without aborting, much like EINTR and EWOULDBLOCK are. ok's from various maintainers of these directories...
2013-03-06as done in ospf{,6}d/relayd, sync yyerror in various other daemons withStuart Henderson
that from bgpd, so that it logs to syslog when daemonized.
2012-09-26last stage of rfc changes, using consistent Rs/Re blocks, and moving theJason McIntyre
references into a STANDARDS section;
2012-08-29rfc 5036 obsoletes rfc 3036; ok claudioJason McIntyre
2012-05-14Don't display a nonsense uptime for an inactive interface. ldpd fix fromStuart Henderson
Rafael Zalamena on tech@, I also applied it to ospfd. ok phessler@
2012-04-24take a stab at documenting when arguments need quoted, and valid macroJason McIntyre
characters; prompted by a diff from robert peichaer org thanks gilles and henning for feedback ok deraadt zinke
2012-04-12accept pacing ldpd way. Since this daemon has multiple listening fdsClaudio Jeker
we add them all to a accept queue that does the pacing with the accept_pause() and accept_unpause() calls. With and OK deraadt@
2011-08-20Decouple log_verbose() from log_init() so the verbose flag stays set withStuart Henderson
"-v" (previously only "-vd" worked). Similar to recent ospfd commit. ok claudio@
2011-07-04LINK_STATE_IS_UP() cleanup userland part. There is no need to specialClaudio Jeker
case carp(4) interfaces anymore. LINK_STATE_IS_UP() almost always does the right job. OK deraadt@ henning@ This needs a -current kernel or link state may be not reported correctly.
2011-06-26Remove obsolete mcast routes in ldpd and ripd.Claudio Jeker
OK dlg@