OpenBSD CVS

CVS log for src/usr.sbin/ldpd/labelmapping.c


[BACK] Up to [local] / src / usr.sbin / ldpd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.69 / (download) - annotate - [select for diffs], Mon Jul 3 11:51:27 2023 UTC (10 months, 4 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.68: +4 -5 lines
Diff to previous 1.68 (colored)

Use new ibuf API. Use ibuf_data() and ibuf_size() instead of direct
struct access and use ibuf_set_n16() to update the length field.
OK tb@

Revision 1.68 / (download) - annotate - [select for diffs], Sat Mar 4 00:15:35 2017 UTC (7 years, 3 months ago) by renato
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.67: +43 -31 lines
Diff to previous 1.67 (colored)

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

Revision 1.67 / (download) - annotate - [select for diffs], Sat Mar 4 00:12:25 2017 UTC (7 years, 3 months ago) by renato
Branch: MAIN
Changes since 1.66: +24 -1 lines
Diff to previous 1.66 (colored)

Implement RFC 6667 (Typed Wildcard FEC for PWid).

Revision 1.66 / (download) - annotate - [select for diffs], Sat Mar 4 00:09:17 2017 UTC (7 years, 3 months ago) by renato
Branch: MAIN
Changes since 1.65: +119 -3 lines
Diff to previous 1.65 (colored)

Implement RFC 5918 (Typed Wildcard FEC).

Revision 1.65 / (download) - annotate - [select for diffs], Sat Mar 4 00:06:10 2017 UTC (7 years, 3 months ago) by renato
Branch: MAIN
Changes since 1.64: +6 -4 lines
Diff to previous 1.64 (colored)

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).

Revision 1.64 / (download) - annotate - [select for diffs], Fri Mar 3 23:50:45 2017 UTC (7 years, 3 months ago) by renato
Branch: MAIN
Changes since 1.63: +12 -7 lines
Diff to previous 1.63 (colored)

Create helper functions to log sent/received messages.

Revision 1.63 / (download) - annotate - [select for diffs], Fri Mar 3 23:44:35 2017 UTC (7 years, 3 months ago) by renato
Branch: MAIN
Changes since 1.62: +7 -7 lines
Diff to previous 1.62 (colored)

Kill send_notification_nbr().

Be more clever and trigger the PDU SENT event inside send_notification()
when tcp->nbr is set. This way we can eliminate send_notification_nbr()
and always use send_notification() instead.

Revision 1.62 / (download) - annotate - [select for diffs], Fri Mar 3 23:41:27 2017 UTC (7 years, 3 months ago) by renato
Branch: MAIN
Changes since 1.61: +6 -6 lines
Diff to previous 1.61 (colored)

Minor tweaks.

Revision 1.61 / (download) - annotate - [select for diffs], Fri Sep 2 17:16:24 2016 UTC (7 years, 9 months ago) by renato
Branch: MAIN
Changes since 1.60: +2 -1 lines
Diff to previous 1.60 (colored)

Fix small memleak on error path.

Revision 1.60 / (download) - annotate - [select for diffs], Fri Sep 2 17:08:02 2016 UTC (7 years, 9 months ago) by renato
Branch: MAIN
Changes since 1.59: +9 -12 lines
Diff to previous 1.59 (colored)

Improve logging of sent and received messages.

* Standardize the logging format of sent and received messages:
  "msg-[in|out]: message type: lsr-id A.B.C.D [additional info]";

* Log sent label messages as well, not only the received ones;

* Move the logging of sent notification messages from
  send_notification_nbr() to send_notification_full(), this way notification
  triggered by the lde process are logged as well;

* Minor clean-up.

Revision 1.59 / (download) - annotate - [select for diffs], Mon Aug 8 16:45:51 2016 UTC (7 years, 9 months ago) by renato
Branch: MAIN
Changes since 1.58: +27 -8 lines
Diff to previous 1.58 (colored)

Normalize the received prefixes.

We need to use ldp_applymask() to normalize the received
prefixes. Example: 10.1.1.0/16 -> 10.1.0.0/16.

Additionally, stop using IANA's AF numbers in map->fec.prefix.af and use
AF_INET/AF_INET6 instead. This makes the code much simpler, use AF_IPV[46]
only when necessary (decoding/encoding prefixes).

ok claudio@

Revision 1.58 / (download) - annotate - [select for diffs], Sat Jul 16 19:20:16 2016 UTC (7 years, 10 months ago) by renato
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.57: +13 -4 lines
Diff to previous 1.57 (colored)

Fix parsing of mal-formed optional TLVs/Sub-TLVs.

We must detect if a TLV's length extends beyond the end of the containing
message. And, if so, send a fatal "Bad TLV Length" notification message.

Found with the Mu Dynamics Mu-8000 protocol fuzzer.

Revision 1.57 / (download) - annotate - [select for diffs], Fri Jul 15 17:09:25 2016 UTC (7 years, 10 months ago) by renato
Branch: MAIN
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored)

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.

Revision 1.56 / (download) - annotate - [select for diffs], Fri Jul 15 17:05:50 2016 UTC (7 years, 10 months ago) by renato
Branch: MAIN
Changes since 1.55: +5 -1 lines
Diff to previous 1.55 (colored)

Explicitly ignore the Hop Count and Path Vector TLVs.

Since these are "well known" TLVs, we have to explicitly ignore them
otherwise ldpd would send "Unknown TLV" Notification messages when it
shouldn't.

Fixes regression caused by rev1.51.

Revision 1.55 / (download) - annotate - [select for diffs], Fri Jul 1 23:36:38 2016 UTC (7 years, 11 months ago) by renato
Branch: MAIN
Changes since 1.54: +80 -84 lines
Diff to previous 1.54 (colored)

More renaming and whitespace cleanup.

No binary change after "strip -s".

Revision 1.54 / (download) - annotate - [select for diffs], Fri Jul 1 23:33:46 2016 UTC (7 years, 11 months ago) by renato
Branch: MAIN
Changes since 1.53: +14 -3 lines
Diff to previous 1.53 (colored)

Be more compliant with RFC 4447.

When sending a label withdraw during the pseudowire Control Word
negotiation, append a "Wrong C-bit" status TLV after the FEC TLV (in
conformance to RFC 4447 section 6.2). Apparently this has no use other
than aiding in troubleshooting.

Also, extend the recv_labelmessage() function to accept Status TLVs and
ignore them instead of shutting down the session.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Jul 1 23:29:55 2016 UTC (7 years, 11 months ago) by renato
Branch: MAIN
Changes since 1.52: +10 -13 lines
Diff to previous 1.52 (colored)

Several minor tweaks.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Jun 27 19:06:33 2016 UTC (7 years, 11 months ago) by renato
Branch: MAIN
Changes since 1.51: +39 -31 lines
Diff to previous 1.51 (colored)

Handle ibuf_add() errors.

tweaks from claudio@

Revision 1.51 / (download) - annotate - [select for diffs], Sat Jun 18 01:29:05 2016 UTC (7 years, 11 months ago) by renato
Branch: MAIN
Changes since 1.50: +1 -5 lines
Diff to previous 1.50 (colored)

Remove TODO comments about loop detection.

LDP loop detection is only necessary for ATM LSRs running in cell mode. We
are never going to implement this "feature".

Also, add two more comments in lde_check_request().

Revision 1.50 / (download) - annotate - [select for diffs], Sat Jun 11 02:01:46 2016 UTC (7 years, 11 months ago) by renato
Branch: MAIN
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

Send an 'Unknown FEC' Notification for unexpected wildcard FECs.

This is basically just to make ANVL happy, there's not much difference
between sending an 'Unknown FEC' or a 'Malformed TLV' Notification.

Fixes ANVL LDP test 15.6.

Revision 1.49 / (download) - annotate - [select for diffs], Sat Jun 11 01:55:35 2016 UTC (7 years, 11 months ago) by renato
Branch: MAIN
Changes since 1.48: +9 -7 lines
Diff to previous 1.48 (colored)

Make all TLV parsing functions look the same for consistency.

Also, add one more safety check in recv_init().

Revision 1.48 / (download) - annotate - [select for diffs], Sat Jun 11 01:52:33 2016 UTC (7 years, 11 months ago) by renato
Branch: MAIN
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

Make it possible to parse unknown TLVs in the future.

In the parsing of label and notification messages, we were always
unsetting the first bit of the TLV type before comparing it against the
types we know. We should not do this because our type constants can have
this bit set when appropriate.

By now the only unknown TLV supported by ldpd(8) is TLV_TYPE_DUALSTACK,
which is only used in Hello messages. But we might change this in the
future with support for MAC List TLVs and maybe RFC 7473.

Revision 1.47 / (download) - annotate - [select for diffs], Sat Jun 11 01:44:02 2016 UTC (7 years, 11 months ago) by renato
Branch: MAIN
Changes since 1.46: +1 -6 lines
Diff to previous 1.46 (colored)

Fix parsing of multiple optional TLVs in label and notification messages.

We were accepting at most one optional TLV.

Fixes IxANVL LDP test 15.3.

Revision 1.46 / (download) - annotate - [select for diffs], Mon May 23 19:14:03 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.45: +2 -1 lines
Diff to previous 1.45 (colored)

Update copyright information.

Revision 1.45 / (download) - annotate - [select for diffs], Mon May 23 19:11:42 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.44: +2 -12 lines
Diff to previous 1.44 (colored)

Remove superfluous includes.

Revision 1.44 / (download) - annotate - [select for diffs], Mon May 23 19:09:25 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.43: +9 -9 lines
Diff to previous 1.43 (colored)

Make functions and variables static whenever possible.

The benefits of this include:
* clean up of the ldpd global namespace;
* improved readability;
* more hints to the compiler/linker to generate more efficient code.

Whenever possible, move global static variables to a smaller scope
(function).

All extern variables are now declared in header files to avoid unnecessary
duplication.

This patch also cleans up the indentation of all function prototypes
and global variables.

Revision 1.43 / (download) - annotate - [select for diffs], Mon May 23 18:58:48 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.42: +54 -22 lines
Diff to previous 1.42 (colored)

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.

Revision 1.42 / (download) - annotate - [select for diffs], Mon May 23 18:51:52 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.41: +10 -3 lines
Diff to previous 1.41 (colored)

Reject null labels for PW-ID FECs.

Revision 1.41 / (download) - annotate - [select for diffs], Mon May 23 17:43:42 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.40: +80 -80 lines
Diff to previous 1.40 (colored)

Fix mess caused by my commit script.

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

Revision 1.40 / (download) - annotate - [select for diffs], Mon May 23 16:43:57 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.39: +5 -1 lines
Diff to previous 1.39 (colored)

Make send_labelmessage() more robust.

Immediately return from this function if the given list of mappings
is empty. This way we have more freedom when sending label messages,
not having to care with corner cases.

Revision 1.39 / (download) - annotate - [select for diffs], Mon May 23 16:41:52 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.38: +4 -3 lines
Diff to previous 1.38 (colored)

Fix check of when a wildcard group PW-ID FEC is valid or not.

In addition to label mappings, wildcard group PW-ID FECs are invalid in
label requests and label abort requests too.

Revision 1.38 / (download) - annotate - [select for diffs], Mon May 23 16:25:11 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.37: +1 -3 lines
Diff to previous 1.37 (colored)

Remove unnecessary break statements.

Revision 1.37 / (download) - annotate - [select for diffs], Mon May 23 16:12:28 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.36: +7 -7 lines
Diff to previous 1.36 (colored)

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.

Revision 1.36 / (download) - annotate - [select for diffs], Mon May 23 16:04:04 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

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.

Revision 1.35 / (download) - annotate - [select for diffs], Mon May 23 15:14:07 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

Replace manually written function names with __func__.

Revision 1.34 / (download) - annotate - [select for diffs], Tue Jul 21 05:02:57 2015 UTC (8 years, 10 months ago) by renato
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.33: +10 -8 lines
Diff to previous 1.33 (colored)

Rename, move and reuse mapping list functions.

ok claudio@

Revision 1.33 / (download) - annotate - [select for diffs], Tue Jul 21 04:52:29 2015 UTC (8 years, 10 months ago) by renato
Branch: MAIN
Changes since 1.32: +258 -80 lines
Diff to previous 1.32 (colored)

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@

Revision 1.32 / (download) - annotate - [select for diffs], Sun Jul 19 20:54:16 2015 UTC (8 years, 10 months ago) by renato
Branch: MAIN
Changes since 1.31: +44 -16 lines
Diff to previous 1.31 (colored)

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@

Revision 1.31 / (download) - annotate - [select for diffs], Mon Feb 9 11:53:25 2015 UTC (9 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

Initialise a variable to please gcc.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Jan 20 18:09:12 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.29: +6 -3 lines
Diff to previous 1.29 (colored)

Do not assume a read buffer coming from libevent is aligned.  Copy the
int to an aligned variable before operating on it.
ok claudio

Revision 1.29 / (download) - annotate - [select for diffs], Sat Oct 25 03:23:49 2014 UTC (9 years, 7 months ago) by lteo
Branch: MAIN
Changes since 1.28: +1 -2 lines
Diff to previous 1.28 (colored)

Remove unnecessary netinet/in_systm.h include.

ok millert@

Revision 1.28 / (download) - annotate - [select for diffs], Thu Oct 17 17:52:20 2013 UTC (10 years, 7 months ago) by renato
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.27: +45 -159 lines
Diff to previous 1.27 (colored)

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

Revision 1.27 / (download) - annotate - [select for diffs], Thu Oct 17 17:47:03 2013 UTC (10 years, 7 months ago) by renato
Branch: MAIN
Changes since 1.26: +190 -364 lines
Diff to previous 1.26 (colored)

Improve parsing of label mapping messages and merge all recv_label*
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.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Oct 15 20:27:40 2013 UTC (10 years, 7 months ago) by renato
Branch: MAIN
Changes since 1.25: +1 -11 lines
Diff to previous 1.25 (colored)

Generate the NBR_EVT_PDU_RCVD event in a single point.
OK claudio@

Revision 1.25 / (download) - annotate - [select for diffs], Tue Oct 15 19:59:53 2013 UTC (10 years, 7 months ago) by renato
Branch: MAIN
Changes since 1.24: +104 -50 lines
Diff to previous 1.24 (colored)

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

Revision 1.24 / (download) - annotate - [select for diffs], Tue Jun 4 02:34:48 2013 UTC (11 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.23: +6 -6 lines
Diff to previous 1.23 (colored)

Always accept TCP connection requests and identify to which neighbor
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

Revision 1.23 / (download) - annotate - [select for diffs], Sat Jun 1 19:42:07 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.22: +6 -1 lines
Diff to previous 1.22 (colored)

Restart the keepalive timer whenever a LDP PDU is sent. There is no need
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

Revision 1.22 / (download) - annotate - [select for diffs], Sat Jun 1 19:01:32 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.21: +1 -31 lines
Diff to previous 1.21 (colored)

Improve error handling on session_read
* 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

Revision 1.21 / (download) - annotate - [select for diffs], Sat Jun 1 18:47:07 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.20: +6 -6 lines
Diff to previous 1.20 (colored)

Drop support for per-interface labelspaces.
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

Revision 1.20 / (download) - annotate - [select for diffs], Sat Jun 1 18:35:02 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.19: +1 -16 lines
Diff to previous 1.19 (colored)

Drop support for passive interfaces.
Support for passive interfaces was inherited from ospfd but it doesn't
make any sense at all for ldpd.
Diff from Renato Westphal

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jan 10 11:52:04 2011 UTC (13 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.18: +7 -7 lines
Diff to previous 1.18 (colored)

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.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Dec 31 21:22:42 2010 UTC (13 years, 5 months ago) by guenther
Branch: MAIN
Changes since 1.17: +2 -1 lines
Diff to previous 1.17 (colored)

Add missing #includes instead of assuming that some system header pulls in
the needed bits

ok deraadt@, millert@

Revision 1.17 / (download) - annotate - [select for diffs], Thu Nov 4 09:52:16 2010 UTC (13 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.16: +227 -160 lines
Diff to previous 1.16 (colored)

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@

Revision 1.16 / (download) - annotate - [select for diffs], Tue Oct 26 12:59:03 2010 UTC (13 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.15: +57 -26 lines
Diff to previous 1.15 (colored)

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

Revision 1.15 / (download) - annotate - [select for diffs], Tue Oct 26 12:35:25 2010 UTC (13 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.14: +33 -6 lines
Diff to previous 1.14 (colored)

For label release and withdraw messages make sure that a wildcard
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.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Oct 26 12:22:35 2010 UTC (13 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.13: +20 -20 lines
Diff to previous 1.13 (colored)

struct mapping_entry should just have a struct map instead of own
definition of a FEC mapping. This makes extending struct map simpler
and makes it possible to access the additional data in struct map.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jun 30 01:47:11 2010 UTC (13 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.12: +7 -7 lines
Diff to previous 1.12 (colored)

Switch prefix in struct map to a struct in_addr instead of a u_int32_t.
Needed for further clean etc.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jun 9 14:01:03 2010 UTC (13 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.11: +1 -19 lines
Diff to previous 1.11 (colored)

Move the logging of FEC changes to the LDE and print the FEC and label
information. This is more useful.
OK michele

Revision 1.11 / (download) - annotate - [select for diffs], Wed May 26 13:56:07 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.10: +25 -25 lines
Diff to previous 1.10 (colored)

Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.

ok henning gilles claudio jacekm deraadt

Revision 1.10 / (download) - annotate - [select for diffs], Tue May 25 09:40:10 2010 UTC (14 years ago) by claudio
Branch: MAIN
Changes since 1.9: +178 -77 lines
Diff to previous 1.9 (colored)

Implement the missing label map recv functions and cleanup the other recv
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.

Revision 1.9 / (download) - annotate - [select for diffs], Mon May 17 08:07:04 2010 UTC (14 years ago) by claudio
Branch: MAIN
Changes since 1.8: +3 -8 lines
Diff to previous 1.8 (colored)

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

Revision 1.8 / (download) - annotate - [select for diffs], Thu Apr 15 14:47:12 2010 UTC (14 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.7: +11 -5 lines
Diff to previous 1.7 (colored)

Even though label withdraw, release, and abort requests are not fully
implemented use a correct return value so that ldpd has a chance to survive
when one of those messages are received.
OK michele@

Revision 1.7 / (download) - annotate - [select for diffs], Thu Feb 25 17:40:46 2010 UTC (14 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.6: +6 -13 lines
Diff to previous 1.6 (colored)

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

Revision 1.6 / (download) - annotate - [select for diffs], Mon Feb 22 09:44:04 2010 UTC (14 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.5: +20 -23 lines
Diff to previous 1.5 (colored)

Correctly encode FEC prefixes. This makes my test setup much happyer.
OK michele

Revision 1.5 / (download) - annotate - [select for diffs], Sat Feb 20 21:28:39 2010 UTC (14 years, 3 months ago) by michele
Branch: MAIN
Changes since 1.4: +11 -21 lines
Diff to previous 1.4 (colored)

Make send_* functions return void (and not int) as they can just succeed
or fatal().

ok claudio@

Revision 1.4 / (download) - annotate - [select for diffs], Wed Dec 30 11:05:58 2009 UTC (14 years, 5 months ago) by michele
Branch: MAIN
Changes since 1.3: +36 -14 lines
Diff to previous 1.3 (colored)

Correctly parse the host address in the FEC TLV.

ok claudio@

Revision 1.3 / (download) - annotate - [select for diffs], Thu Dec 10 21:47:11 2009 UTC (14 years, 5 months ago) by michele
Branch: MAIN
Changes since 1.2: +6 -4 lines
Diff to previous 1.2 (colored)

Length of the host address in the FEC TLV must be encoded in number
of octets.

ok claudio@

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jun 5 22:34:45 2009 UTC (14 years, 11 months ago) by michele
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.1: +19 -42 lines
Diff to previous 1.1 (colored)

Correctly send notification messages when errors occur.

ok claudio@ laurent@

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jun 1 20:59:45 2009 UTC (15 years ago) by michele
Branch: MAIN

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@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.