History log of /openbsd-current/usr.sbin/ldpd/ldp.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.42 04-Mar-2017 renato

Send VPLS MAC withdrawals.

RFC 4762 says that MAC address withdrawal messages can be used to
improve convergence time in VPLS networks. This patch makes ldpd send
MAC withdrawals whenever a non-pseudowire interface pertaining to a
VPLS goes down. The processing of received MAC withdrawals will be
implemented later.


# 1.41 04-Mar-2017 renato

Implement RFC 5919 (LDP End-of-LIB).


# 1.40 04-Mar-2017 renato

Implement RFC 6667 (Typed Wildcard FEC for PWid).


# 1.39 04-Mar-2017 renato

Implement RFC 5918 (Typed Wildcard FEC).


# 1.38 04-Mar-2017 renato

Implement RFC 5561 (LDP Capabilities).

This patch per-se doesn't introduce any useful functionality, but prepares
the ground for new enhancements to ldpd (i.e. implementation of new RFCs
that make use of LDP capabilities).


# 1.37 03-Mar-2017 renato

The PW Status is an unknown TLV.

Without this fix, any LDP speaker that doesn't implement RFC 4447 will
shut down the session upon receipt of a PWid Label Mapping (unless the
use of the PW-Status TLV is disabled via configuration).


# 1.36 03-Mar-2017 renato

Minor tweaks.


# 1.35 03-Sep-2016 renato

Rework the sending of address messages.

* Respect the session's negotiated maximum pdu length and split the
sending of our local addresses into multiple messages if necessary;

* Log sent/received addresses;

* Add new wrappers to send only one address (send_address_single)
and to send all addresses of the given address-family
(send_address_all). These wrappers create a temporary list of addresses
to be sent, and send_address() then acts on this last.


Revision tags: OPENBSD_6_0_BASE
# 1.34 15-Jul-2016 renato

Improve logging of reserved labels.

Print "exp-null" and "imp-null" instead of "0" and "3", for example. Also,
remove print_label() and print_pw_type() from ldpctl.c and use the
equivalent functions from ldpd's log.c.

While here, be more paranoid and use UINT32_MAX instead of UINT_MAX
for NO_LABEL.


# 1.33 01-Jul-2016 renato

More renaming and whitespace cleanup.

No binary change after "strip -s".


# 1.32 01-Jul-2016 renato

Decrease the initialization FSM timeout.

The previous value of 180 was just too long. If a neighbor get stuck in
the initialization FSM for more than 15 seconds, then there's certainly
something wrong and the session should be dropped.

A potential case of a neighbor getting stuck in the initialization
FSM is when both the local and the remote LSRs disable the LDPv4 GTSM
negotiation and there's a mismatch in their GTSM configuration (one is
enabled for GTSM while the other is not).

In this case, a smaller timeout allows for a quicker recovery of the
session when the configuration is fixed on either side.


# 1.31 01-Jul-2016 renato

Rename hello flags to keep consistent with the rest of the code.

Flag constants should start with F_.


# 1.30 01-Jul-2016 renato

Add GTSM support (RFC 6720).

This also finishes the missing bits from our RFC 7552 implementation
because GTSM is mandatory for LDPv6.

To avoid any kind of interoperability problems, I included a few
knobs to enable/disable GTSM on a per-address-family and per-neighbor
basis. Cisco's LDPv6 implementation, for instance, doesn't support GTSM.

"reads good" claudio@


# 1.29 23-May-2016 renato

Update copyright information.


# 1.28 23-May-2016 renato

Remove superfluous includes.


# 1.27 23-May-2016 renato

Add support for IPv6 (RFC 7552).

This includes:
* Full compliance to RFC 7552;
* Support for MD5 on LDPov6 sessions;
* Support for pseudowires over IPv6 LSPs (we're probably the world's
first implementation doing this);
* Support for the IPv6 explicit-null label;
* Knob to specify the prefered address-family for TCP transport
connections;
* Knob to use cisco non-compliant format to send and interpret the
Dual-Stack capability TLV.


# 1.26 23-May-2016 renato

Fix mess caused by my commit script.

I screwed up everything... trying to fix now.


# 1.25 23-May-2016 renato

Minor adjustments in l2vpn code.

* Define a new constant for the default pseudowire type;
* On l2vpn_new(), initialize the l2vpn lists with LIST_NEW (cosmetic
because the struct was calloc'ed);
* Add a const qualifier to the second parameter of l2vpn_find();
* Remove l2vpn_if_del() and use just free() instead.


# 1.24 23-May-2016 renato

Rename a few constants to avoid confusion.

In ldpd we have the map structure, which is used to represent a label message,
and the fec structure, used to store FECs in the LIB.

As of now, ldpd supports two type of FECs:
* IPv4 prefix (FEC_TYPE_IPV4);
* PWID (FEC_TYPE_PWID).

For the label messages, the following contants were being used:
* FEC_WILDCARD;
* FEC_PREFIX (IPv4 or IPv6);
* FEC_PWID.

Since these contants have similar names to the previous ones, rename
them to:
* MAP_TYPE_WILDCARD;
* MAP_TYPE_PREFIX;
* MAP_TYPE_PWID.


# 1.23 23-May-2016 renato

Remove unused code.


# 1.22 23-May-2016 renato

Improve the parser of TCP/session packets.

Add more safeguards against malformed packets and fix existing ones. Also,
rename a few variables and constants to match their real meaning. For
example, rename gen_msg_tlv() to gen_msg_hdr() because this function
generates an LDP header, not a TLV.

Finally, clean-up all the send_* functions so they all follow the same
pattern.


# 1.21 23-May-2016 renato

Validate received hello holdtime and keepalive time.

Refuse a keepalive time of zero because it's invalid. For the hello
holdtime, zero is valid and means infinite.

Additionally, refuse values smaller than three for both the keepalive
timer and the hello holdtime. The keepalive/hello interval is calculated
as one third of their holdtime, which means that if the holdtime is one
or two, the calculated interval would be zero using integer arithmetic.

If anyone wants to use such a small holdtime, he or she should use
BFD instead.


# 1.20 23-May-2016 renato

Move some code around.

This patch doesn't introduce any logical change.


Revision tags: OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.19 21-Jul-2015 renato

VPLS signaling support.

This patch introduces full support for pseudowire signaling in ldpd(8),
including Control Word and Status TLV negotiation.

As of now it's not possible to configure a VPWS, but the signaling is
the same. In the future, when VPWS support is available in the kernel,
ldpd(8) can be extended to support VPWS with only a few modifications.

Limitations:
* No support for FEC 129, only FEC 128 (more widely deployed);
* No support for group withdraws (not widely deployed);
* No support for MAC withdraws (not widely deployed).

Related RFCs:
* RFC 3916: Requirements for Pseudo-Wire Emulation Edge-to-Edge (PWE3)
* RFC 3985: Pseudo Wire Emulation Edge-to-Edge (PWE3) Architecture
* RFC 4385: Pseudowire Emulation Edge-to-Edge (PWE3) Control Word for
Use over an MPLS PSN
* RFC 4446: IANA Allocations for Pseudowire Edge to Edge Emulation (PWE3)
* RFC 4447: Pseudowire Setup and Maintenance Using the Label Distribution
Protocol (LDP)
* RFC 4448: Encapsulation Methods for Transport of Ethernet over MPLS
Networks
* RFC 4905: Encapsulation Methods for Transport of Layer 2 Frames over
MPLS Networks
* RFC 4906: Transport of Layer 2 Frames Over MPLS

ok claudio@


# 1.18 19-Jul-2015 renato

Rework label mapping algorithms to be more in line with the RFC.

This patch presents a thoroughly review of the label mapping
algorithms. Most of the changes are minor bug fixes in the handling of
received label messages.

Additional improvements:
* Add a few more references to the Appendix A of the RFC5036 ("LDP
Label Distribution Procedures") into the code;
* Add full multipath support;
* Send label withdraws when appropriate;
* Add label withdraw/release wildcard support.

NOTE: As a result of implementing only the "Liberal Label Retention" and
"Downstream Unsolicited" modes, we will never send a label request
("Request Never"). And that means that we can ignore the following
notification messages: "Label Request Aborted", "No Label Resources",
"No Route" and "Label Resources Available". The following algorithms
mentioned in the RFC can also be ignored: "Timeout of Deferred Label
Request", "Detect Local Label Resources Have Become Available" and
"Receive Label Abort Request".

Now, considering that we only support one combination of all modes of
operation, we can say that we have an almost complete implementation of
the protocol.

ok claudio@


# 1.17 21-Mar-2015 renato

Remove unused variables and functions.


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE
# 1.16 17-Oct-2013 renato

Respect the max pdu length and merge all send_label* functions into
a single generic function.


# 1.15 15-Oct-2013 renato

Improve parsing of LDP messages.
Add more sanity checks and send proper notification messages on error
conditions.
OK claudio@


# 1.14 15-Oct-2013 renato

Ignore messages that have Unknown flag set.
OK claudio@


Revision tags: OPENBSD_5_4_BASE
# 1.13 04-Jun-2013 claudio

Implement support for adjacencies and targeted hellos
Refactor adjacencies out of the neighbor handling so that it is possible to
have more complex topologies with targeted sessions.
From Renato Westphal


# 1.12 04-Jun-2013 claudio

Properly implement the exponential backoff timer on session initialization

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


# 1.11 01-Jun-2013 claudio

Always advertise the Router-ID as the transport address.
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


# 1.10 30-May-2013 claudio

Simplify hello holdtime calculation and stop the timeout timer if the
holdtime is "infinite".
Diff from Renato Westphal [renatowestphal at gmail.com]


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.9 10-Jan-2011 claudio

Better optional parameter parsing. Ignore unknown TLVs that have
the U flag set. Kill struct hello_opt_parms_tlv since it is now
unused.


# 1.8 10-Jan-2011 claudio

Rename struct fec_tlv to struct tlv since it is just the generic
TLV header which will be used in different places shortly.
Cleanup the ldp.h header file a tiny bit.


# 1.7 04-Nov-2010 claudio

Rewrite all packet parsers to be more careful about alignment. Until
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@


# 1.6 26-Oct-2010 claudio

Implement the optional label request message ID TLV.
Currently on the genaration side is done.


Revision tags: OPENBSD_4_8_BASE
# 1.5 17-May-2010 claudio

The host address encoding of FEC was killed in RFC5036 and we're happy
about that. OK michele@


# 1.4 15-Apr-2010 claudio

struct ldp_hdr has probably the worst possible layout (ending with a single
u_int16_t) and must therefor be __packed or sizeof() returns a to large size
and causes some very nasty issues.
"embrace __packed" dlg@ OK michele@
While there add new notification status types defined in RFC5036


Revision tags: OPENBSD_4_7_BASE
# 1.3 25-Feb-2010 claudio

Do not use bufferevent for something that's already covered in the imsg
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


# 1.2 09-Dec-2009 michele

Enable parsing of the optional Transport Address TLV in the hello
message.

ok claudio@


Revision tags: OPENBSD_4_6_BASE
# 1.1 01-Jun-2009 michele

Welcome ldpd, the Label Distribution Protocol daemon.
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@