summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/labelmapping.c
AgeCommit message (Collapse)Author
2013-10-17Respect the max pdu length and merge all send_label* functions intoRenato Westphal
a single generic function.
2013-10-17Improve parsing of label mapping messages and merge all recv_label*Renato Westphal
functions into a single generic function. Add a few error checks and implement parsing of optional tlvs. Putting it all together helps avoid to code duplication and improve maintainability.
2013-10-15Generate the NBR_EVT_PDU_RCVD event in a single point.Renato Westphal
OK claudio@
2013-10-15Improve parsing of LDP messages.Renato Westphal
Add more sanity checks and send proper notification messages on error conditions. OK claudio@
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-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-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
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.
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-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-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-09Move the logging of FEC changes to the LDE and print the FEC and labelClaudio Jeker
information. This is more useful. OK michele
2010-05-26Rename some imsg bits to make namespace collisions less likely buf toNicholas Marriott
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE. ok henning gilles claudio jacekm deraadt
2010-05-25Implement the missing label map recv functions and cleanup the other recvClaudio Jeker
functions a bit to make them all look more similar. All but the label req abort message are now parsed and passed to the lde.
2010-05-17The host address encoding of FEC was killed in RFC5036 and we're happyClaudio Jeker
about that. OK michele@
2010-04-15Even though label withdraw, release, and abort requests are not fullyClaudio Jeker
implemented use a correct return value so that ldpd has a chance to survive when one of those messages are received. OK michele@
2010-02-25Do not use bufferevent for something that's already covered in the imsgClaudio Jeker
buffer API. This fixes a few possible problems in session_read and does some further cleanup in various places. Wrap msgbuf into evbuf to add libevent functionality and use buf_read to handle the read side of a session. OK michele@ and dlg@ did not see anything evil
2010-02-22Correctly encode FEC prefixes. This makes my test setup much happyer.Claudio Jeker
OK michele
2010-02-20Make send_* functions return void (and not int) as they can just succeedMichele Marchetto
or fatal(). ok claudio@
2009-12-30Correctly parse the host address in the FEC TLV.Michele Marchetto
ok claudio@
2009-12-10Length of the host address in the FEC TLV must be encoded in numberMichele Marchetto
of octets. ok claudio@
2009-06-05Correctly send notification messages when errors occur.Michele Marchetto
ok claudio@ laurent@
2009-06-01Welcome ldpd, the Label Distribution Protocol daemon.Michele Marchetto
Built using the imsg/three process framework, its main aim is to redistribute MPLS labels between peers. Right now it has some really basic functionalities, the basic protocol works and peers are able to exchange labels and insert them in the kernel. It still does not react to changes of topology. Not yet connected to the builds. ok claudio@ deraadt@