summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd
AgeCommit message (Collapse)Author
2011-03-12Bad bad Claudio. Fix an evil bug that caused nbr addr_tree corruption.Claudio Jeker
Do not insert neighbors first to the address tree and then assign the address to the struct. Instead pass the address to nbr_new() so all keys for the various RB trees are available when setting the neighbor up.
2011-03-12Log the fact that a session was not accepted because of missing HELLOs.Claudio Jeker
2011-01-20- tyop, recieve -> receiveJasper Lievisse Adriaanse
ok sthen@
2011-01-10Fix a bad heritage from ospfd. Make neighbors independent of interfaces.Claudio Jeker
They are not bound as strongly as in ospf and causes problems when the TCP connection is established from an not connected IP (e.g. a loopback). Use three RB trees to sort the neighbor list by id, addr and peerid. More cleanup is needed but this makes ldpd work against peers using loopback IPs. Problem found, reported and fix tested again by Marcel Wiget.
2011-01-10Make sure the tlv length is exactly the size we expect.Claudio Jeker
2011-01-10Implement optional parameter handling for initialization messages.Claudio Jeker
This will now correctly ignore TLV with U flag set -- like the FT extension used by JunOS. The function is built after tlv_decode_opt_hello_prms(). Problem reported and fix tested by Marcel Wiget.
2011-01-10Better optional parameter parsing. Ignore unknown TLVs that haveClaudio Jeker
the U flag set. Kill struct hello_opt_parms_tlv since it is now unused.
2011-01-10Rename struct fec_tlv to struct tlv since it is just the genericClaudio Jeker
TLV header which will be used in different places shortly. Cleanup the ldp.h header file a tiny bit.
2011-01-08Count the right values for the consumed counter.Claudio Jeker
Problem found and fix provided by Marcel Wiget <mwiget () gmail ! com>
2010-12-31Add missing #includes instead of assuming that some system header pulls inPhilip Guenthe
the needed bits ok deraadt@, millert@
2010-11-04Rewrite all packet parsers to be more careful about alignment. UntilClaudio Jeker
now ldpd had no chance to run on a strict alignment architecture but this makes ldpd happy on sparc64. Be careful to do all needed overflow checks and try to make all parsing functions look similar. OK michele@
2010-11-04Only consider pathes with highest priority when replying to labelClaudio Jeker
requests. Else a priority inversion may happen that would build label switching pathes that use inactive routes. OK michele@
2010-10-26Implement the optional label request message ID TLV.Claudio Jeker
Currently on the genaration side is done.
2010-10-26For label release and withdraw messages make sure that a wildcardClaudio Jeker
FEC is the one and only FEC of that message. This is required by the RFC. While it is not correct to have multiple FEC in anything but label mapping messages ldpd will accept those since the RFC is extra vague about this feature and it does not hurt.
2010-10-26struct mapping_entry should just have a struct map instead of ownClaudio Jeker
definition of a FEC mapping. This makes extending struct map simpler and makes it possible to access the additional data in struct map.
2010-10-26Change lde_check_request(), lde_check_mapping(), lde_send_labelmapping(),Claudio Jeker
lde_send_labelrequest(), and lde_nbr_do_mappings() to follow the algorithms defined in Appendix A of RFC 5036. Added comments and markers for better understanding and to find missing bits. OK michele@
2010-10-26Shuffle the deck chairs to make the code more compact.Claudio Jeker
OK michele@
2010-10-21Start implementing the missing lablemapping messages in the LDE andClaudio Jeker
fix the existing ones to correctly track outstanding request and sent / recv mappings. Looks good to michele@
2010-10-20Since on shutdown fib_sync is forced to 1 to remove the multicast routeClaudio Jeker
it needs to be set to 0 afterwards again, because the FIB was decoupled right before and now no "route vanished before delete" messages are printed on shutdown.
2010-10-15Rework the kroute framework of ldpd. ldpd is different from the otherClaudio Jeker
routing daemons. Change the way the kroute tree is indexed (by FEC with a linked list in case there is a priority conflict -- same route + nexthop at different priorities). This needs a mpath capable MPLS routing table. Still work in progress but works a lot better in close meshed networks.
2010-10-07Don't try to add MPLS routes with a incomming MPLS_LABEL_IMPLNULL label.Claudio Jeker
The kernel has now a static entry for them and they should not hit the wire anyway.
2010-10-07Garbage collect some unused structs.Claudio Jeker
2010-09-06Only run the nbr_idtimer() when this side is acting as master (establishingClaudio Jeker
the tcp session). Calling nbr_act_session_establish() on slave systems can crash ldpd because active events are reinitialized. OK michele@
2010-09-06The nbr_reset_*() timer fucntions are the same as the nbr_start_* function.Claudio Jeker
So replace the few calls to the reset function with nbr_start_*(). OK michele@
2010-09-02NBR_STA_SESSION, NBR_STA_UP, and NBR_STA_ACTIVE represent all the sameClaudio Jeker
group of states (all but NBR_STA_DOWN). Clean up this confusion and remove NBR_STA_UP and NBR_STA_ACTIVE. OK michele@
2010-09-01s/lfib/fib/ for more consitency with the other routing daemons.Claudio Jeker
This started manly because of ldpctl beeing inconsistent and me misstyping lfib almost every time. OK michele@
2010-08-27Fix format string that was not changed after the log_fec introduction.Claudio Jeker
2010-08-26Fix a memory leak in an error path. Found and diff by Igor Zinovik.Claudio Jeker
OK michele@
2010-08-03fix linecount bug with comments spanning multiple linesHenning Brauer
problem reported with the obvious fix for bgpd by Sebastian Benoit <benoit-lists at fb12.de>, also PR 6432 applied to all the others by yours truly. ok theo isn't it amazing how far this parser (and more) spread?
2010-07-12Merge duplicate log messages into one log_warn().Alexander Bluhm
ok claudio@
2010-07-08Kill more code in kroute.c that is unneeded in ldpd. ldpd is a bit strangeClaudio Jeker
since it does not care that much about reachability of routes. The idea is to have diverse LSP in the kernel and the kernel should then decide which path should be used. OK michele@
2010-06-30Make it possible to store multiple LSP to a FEC. This is another step toClaudio Jeker
handle multipath routes in MPLS. Looks good to michele@
2010-06-30Pass a struct kroute and not a kroute_node to kr_redist_remove(). ThisClaudio Jeker
allows kr_redist_eval() to call kr_redist_remove(0 instead of hand rolling the same code.
2010-06-30Kill IMSG_KLABEL_INSERT and all the related functions around it.Claudio Jeker
IMSG_KLABEL_CHANGE is smart enough to know when something is a change or an insert.
2010-06-30Rework how we "redistribute" networks. Send all pathes of an active routeClaudio Jeker
to the lde so we can assign remote labels to all of those pathes.
2010-06-30Sync kroute.c code with ospfd's version of kroute.c. A small step to supportClaudio Jeker
multipath routes.
2010-06-30Switch prefix in struct map to a struct in_addr instead of a u_int32_t.Claudio Jeker
Needed for further clean etc.
2010-06-23Fix comment. Downstream is towards the destination of a LSP.Claudio Jeker
Therefor the list holds the recv mappings and not the sent mappings. ldpd sends his mappings upstream.
2010-06-23Kill rt_node->invalid it is not used by anything.Claudio Jeker
2010-06-21Send the right kroute struct to ldpctl for IMSG_CTL_KROUTE. This shouldClaudio Jeker
fix printing of multipath routes.
2010-06-21Requiring { } blocks for interfaces is dumb since most don't need anyClaudio Jeker
additional options.
2010-06-10No need to print FEC twice. Remove it in the log function.Claudio Jeker
2010-06-10Signal a neighbor down event to the LDE when the TCP session is closed.Claudio Jeker
The LDE only tracks neighbors with a running sessions, no session no neighbor needed. So do not wait until the neighbor is removed in the engine to signal the LDE since that happens a lot later. Solves a fatal in LDE when restarting a remote ldpd quickly. OK michele
2010-06-09Move the logging of FEC changes to the LDE and print the FEC and labelClaudio Jeker
information. This is more useful. OK michele
2010-06-09More useful warning message.Claudio Jeker
2010-06-07Store all labels in ldpd in host byte order without any additional shifting.Claudio Jeker
Add the necessary ntohl() and shifts in various places and cleanup the byte order mess we had before. michele@ agrees.
2010-06-02MPLSCTL_ENABLE is gone, no need to check for it. There is also no realClaudio Jeker
reason why ldpd needs to check for ip forwarding so remove that check as well. Reminded by phessler@
2010-06-02Start reworking the LDE. Implement a FEC RB tree that can be used for theClaudio Jeker
route table and the per neighbor request and mapping lists. The received and sent mappings are added to the per neighbor RB tree and additionally linked to the route table. This makes lookups, etc. a lot easier. While there flip the neighbor hash list over to a RB tree. OK michele@
2010-05-28Send the IMSG_NEIGHBOR_UP msg when the neighbor is going into operationalClaudio Jeker
status instead upon creation (when the first HELLO is received). The LDE needs only to know about operational neighbors or it may happen that the LDE is sending messages to neighbors that have no session open resulting in a crash because of unitialized structures. OK michele@
2010-05-26Move imsg into libutil and add a man page.Nicholas Marriott
Minor bump for libutil. Previous versions of this diff and man page looked at by various people. "you should just commit" deraadt