OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.59 / (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.58: +2 -2 lines
Diff to previous 1.58 (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.58 / (download) - annotate - [select for diffs], Thu Dec 12 00:10:29 2019 UTC (4 years, 5 months ago) by yasuoka
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
Changes since 1.57: +2 -1 lines
Diff to previous 1.57 (colored)

Make ldpd lookup the adjacency not only by source IP address but also
by LSR Id, since remote peer may change its LSR Id.  diff from and
test by Vitaliy Guschin.

ok claudio

Revision 1.57 / (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_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, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.56: +4 -2 lines
Diff to previous 1.56 (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.56 / (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.55: +11 -11 lines
Diff to previous 1.55 (colored)

More renaming and whitespace cleanup.

No binary change after "strip -s".

Revision 1.55 / (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.54: +2 -2 lines
Diff to previous 1.54 (colored)

Several minor tweaks.

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

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

Flag constants should start with F_.

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

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@

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

Fix inverted logic in recv_hello().

Bug introduced by rev1.48 two weeks ago. We were not respecting the
advertised transport connection preference (LDPoIPv4 or LDPoIPv6),
the fix is pretty obvious.

Revision 1.51 / (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.50: +14 -8 lines
Diff to previous 1.50 (colored)

Handle ibuf_add() errors.

tweaks from claudio@

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

Fix removal of dual-stack neighbors.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Jun 13 23:01:37 2016 UTC (7 years, 11 months ago) by renato
Branch: MAIN
Changes since 1.48: +15 -3 lines
Diff to previous 1.48 (colored)

Implement support for the Configuration Sequence Number TLV.

The Configuration Sequence Number optional TLV is documented in RFC 5036,
pages 53 and 54.

Fixes IxANVL LDP test 23.10.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Jun 13 20:13:34 2016 UTC (7 years, 11 months ago) by renato
Branch: MAIN
Changes since 1.47: +65 -62 lines
Diff to previous 1.47 (colored)

Rework the handling of Hello packets.

With the introduction of IPv6 support by RFC 7552, the handling of Hello
packets in ldpd became something incredibly complex. Neighbors can change
from single-stack LDP to dual-stack and vice-versa. They can change
their transport preference, their transport addresses (IPv4 and IPv6)
and even start or stop sending the Dual-Stack TLV. We also have to take
care to reject things like multiple adjacencies advertising different
transport-addresses for the same neighbor. ldpd was failing for some of
the cases mentioned above, this patch fixes these issues and attempts
to make the code easier to read.

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

Parse the whole Hello packet before processing it.

In the case of an error, we want to return as soon as possible to avoid
having to clean things up.

This fixes a bug where we could create a dynamic targeted neighbor in
response to a malformed packet.

Revision 1.46 / (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.45: +15 -13 lines
Diff to previous 1.45 (colored)

Make all TLV parsing functions look the same for consistency.

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

Revision 1.45 / (download) - annotate - [select for diffs], Thu Jun 9 17:26:32 2016 UTC (7 years, 11 months ago) by renato
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

Send a fatal notification when the last hello adjacency is deleted.

RFC 5036 says:
  "When the last Hello adjacency for an LDP session is
  deleted, the LSR terminates the LDP session by sending a Notification
  message and closing the transport connection".

Send a "Hold Timer Expired" notification when the triggering event is
a hello hold time timeout. In the other cases, like disabling LDP on an
interface, send a "Shutdown" notification instead.

Before this patch we were just closing the neighbor's transport
connection.

Fixes the following ANVL LDP tests: 7.17 and 23.3.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Jun 8 23:14:03 2016 UTC (7 years, 11 months ago) by renato
Branch: MAIN
Changes since 1.43: +7 -3 lines
Diff to previous 1.43 (colored)

Discard Hello packet if advertised transport address is of different AF.

IxANVL LDP test 5.13 was failing for ldpd(8) because we were not
discarding IPv4 Hello messages with an IPv6 transport address (and
vice-versa).

Once again, the RFC is not very explicit about what to do in this
case. Since the IPv4 and IPv6 Transport Address TLVs are optional,
what we were doing is to just ignore them in this case and use source
address of the packet as the implicit transport address.

But the IxANVL team had a different interpretation on this. They think
that discarding the Hello message is the right thing to do in this case.
Let's follow their interpretation because that's probably what most
implementations are doing.

NOTE1: with this patch we still keep ignoring additional Transport Address
TLVs as specified in RFC 7552;
NOTE2: in order to check if a Transport Address TLV was already received
or not, use the F_HELLO_TLV_RCVD_ADDR flag instead of comparing if the
address is zero or not (easier to read).

Fixes IxANVL LDP test 5.13.

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

Update copyright information.

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

Remove superfluous includes.

Revision 1.41 / (download) - annotate - [select for diffs], Mon May 23 19:09:25 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.40: +14 -16 lines
Diff to previous 1.40 (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.40 / (download) - annotate - [select for diffs], Mon May 23 18:58:48 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.39: +287 -54 lines
Diff to previous 1.39 (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.39 / (download) - annotate - [select for diffs], Mon May 23 18:33:56 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

Create network sockets on the parent process.

We drop our privileges in ldpe right after we create the network sockets.
The problem is that we might want to change the transport-address and
reload the config, in which case we need new sockets. To allow that,
always create the network sockets in the parent process and pass them
to ldpe via imsg.

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

Copy structs by assignment instead of memcpy.

Copying by straight assignment is shorter, easier to read and has a
higher level of abstraction. We'll only avoid it when copying from an
unaligned source (e.g., network buffers).

In addition, copy in_addr structs directly.

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

Fix mess caused by my commit script.

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

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

Remove unnecessary mirroring of sockets.

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

Standardize some log messages and fix some inconsistencies.

We were using several different names for the same thing in our log
messages: neighbor, neighbor ID, nbr ID and LSR ID.

Standardize to always use "lsr-id" to refer to a neighbor.

Also:
* Use log_warnx() instead of log_warn() when appropriate;
* Use fatal(x) instead of err(x) when appropriate;
* Fix some inconsistent log messages.

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

More renaming.

Rename a few more things to improve readability.

* s/F_PW_CONTROLWORD_CONF/F_PW_CWORD_CONF/ (shorter)
* s/F_PW_CONTROLWORD/F_PW_CWORD/ (shorter)
* s/LDPD_FLAG_*/F_LDPD_*/ (consistency)
* s/lde_nbr_address/lde_addr/ (shorter)
* s/ldp_discovery_socket/ldp_disc_socket/ (shorter)
* s/ldp_ediscovery_socket/ldp_edisc_socket/ (shorter)
* s/ldp_sendboth/main_imsg_compose_both/ (consistency)
* s/cons/total/ (makes more sense)
* s/kaddr/ka/ (consistency with remaining code)
* Always use 'ln' for lde_nbrs (consistency)

Revision 1.33 / (download) - annotate - [select for diffs], Mon May 23 16:08:18 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.32: +27 -17 lines
Diff to previous 1.32 (colored)

Several improvements in the parsing of UDP/Hello packets.

* Fix check of the packet's size and the "PDU Length" field;
* Add check for the "Message Length" field;
* Check for invalid labelspace earlier.
* Use if_lookup() on disc_recv_iface() to reduce one level of identation;

Additionally, add the following safeguards:
* Check for unicast link hellos;
* Check for multicast targeted hellos;
* Validate packet's source address;
* Validate received transport-address.

Put the ancillary function bad_ip_addr() into a new file, util.c, which
will be used later for several other things.

Revision 1.32 / (download) - annotate - [select for diffs], Mon May 23 16:04:04 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.31: +7 -10 lines
Diff to previous 1.31 (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.31 / (download) - annotate - [select for diffs], Mon May 23 15:53:40 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.30: +6 -1 lines
Diff to previous 1.30 (colored)

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.

Revision 1.30 / (download) - annotate - [select for diffs], Mon May 23 15:43:11 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.29: +4 -3 lines
Diff to previous 1.29 (colored)

Add knob to configure the transport address.

This will be especially important when we add support for IPv6, because
we'll not be able to use the router-id as the transport-address in
this case.

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

Replace manually written function names with __func__.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jul 21 04:52:29 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.27: +2 -2 lines
Diff to previous 1.27 (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.27 / (download) - annotate - [select for diffs], Tue Jul 21 04:43:28 2015 UTC (8 years, 10 months ago) by renato
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

Add configuration reload support.

ok claudio@

Revision 1.26 / (download) - annotate - [select for diffs], Tue Jul 21 04:40:56 2015 UTC (8 years, 10 months ago) by renato
Branch: MAIN
Changes since 1.25: +12 -4 lines
Diff to previous 1.25 (colored)

Assorted fixes and code cleanup for targeted neighbors.

ok claudio@

Revision 1.25 / (download) - annotate - [select for diffs], Sat Apr 4 15:09:47 2015 UTC (9 years, 2 months ago) by renato
Branch: MAIN
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)

Remove unused parameter from adj_new().

The adjacency holdtime is set in recv_hello().

OK claudio@

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

Remove unnecessary netinet/in_systm.h include.

ok millert@

Revision 1.23 / (download) - annotate - [select for diffs], Tue Oct 15 20:31:13 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.22: +2 -2 lines
Diff to previous 1.22 (colored)

Improve debug and error logs.
OK claudio@

Revision 1.22 / (download) - annotate - [select for diffs], Tue Oct 15 20:21:24 2013 UTC (10 years, 7 months ago) by renato
Branch: MAIN
Changes since 1.21: +5 -10 lines
Diff to previous 1.21 (colored)

Fix whitespace and other style issues.
OK claudio@

Revision 1.21 / (download) - annotate - [select for diffs], Tue Oct 15 20:13:47 2013 UTC (10 years, 7 months ago) by renato
Branch: MAIN
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

Since a targeted neighbor can be created both by configuration and
on runtime, the ldpd_conf structure used should be passed as an
argument to avoid segfaults.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Jun 4 02:25:28 2013 UTC (11 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.19: +106 -36 lines
Diff to previous 1.19 (colored)

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

Revision 1.19 / (download) - annotate - [select for diffs], Tue Jun 4 00:56:49 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.18: +8 -8 lines
Diff to previous 1.18 (colored)

Minor adjustments in the initialization FSM
* 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.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Jun 1 19:28:55 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

The keepalive timeout should be configured on a global basis and not per
interface.
Remove the iface pointer from the 'nbr' structure because it's not
needed anymore.
Diff from Renato Westphal

Revision 1.17 / (download) - annotate - [select for diffs], Sat Jun 1 18:47:07 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.16: +4 -4 lines
Diff to previous 1.16 (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.16 / (download) - annotate - [select for diffs], Sat Jun 1 18:35:02 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.15: +1 -4 lines
Diff to previous 1.15 (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.15 / (download) - annotate - [select for diffs], Sat Jun 1 01:34:56 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.14: +24 -14 lines
Diff to previous 1.14 (colored)

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

Revision 1.14 / (download) - annotate - [select for diffs], Fri May 31 14:10:10 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.13: +4 -3 lines
Diff to previous 1.13 (colored)

When the ldpe process calls connect(), it doesn't regain control until
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]

Revision 1.13 / (download) - annotate - [select for diffs], Thu May 30 16:14:50 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.12: +8 -15 lines
Diff to previous 1.12 (colored)

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

Revision 1.12 / (download) - annotate - [select for diffs], Sat Mar 12 01:57:13 2011 UTC (13 years, 2 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
Changes since 1.11: +7 -5 lines
Diff to previous 1.11 (colored)

Bad bad Claudio. Fix an evil bug that caused nbr addr_tree corruption.
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.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jan 10 12:28:25 2011 UTC (13 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

Fix a bad heritage from ospfd. Make neighbors independent of interfaces.
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.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jan 10 12:05:22 2011 UTC (13 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

Make sure the tlv length is exactly the size we expect.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jan 10 11:58:39 2011 UTC (13 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.8: +19 -14 lines
Diff to previous 1.8 (colored)

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

Revision 1.8 / (download) - annotate - [select for diffs], Sat Jan 8 14:50:29 2011 UTC (13 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Count the right values for the consumed counter.
Problem found and fix provided by Marcel Wiget <mwiget () gmail ! com>

Revision 1.7 / (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.6: +66 -54 lines
Diff to previous 1.6 (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.6 / (download) - annotate - [select for diffs], Wed May 26 13:56:07 2010 UTC (14 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.5: +7 -7 lines
Diff to previous 1.5 (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.5 / (download) - annotate - [select for diffs], Wed May 19 15:28:51 2010 UTC (14 years ago) by claudio
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

Remove yet another ospf leftover that is not needed here. This time
neighbor self and all the madness surrounding this amazing concept.
LDP is not self aware so there is no need for this.
OK michele@

Revision 1.4 / (download) - annotate - [select for diffs], Tue Feb 16 21:35:50 2010 UTC (14 years, 3 months ago) by michele
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.3: +1 -5 lines
Diff to previous 1.3 (colored)

Make ldpd less verbose.

ok claudio@

Revision 1.3 / (download) - annotate - [select for diffs], Wed Dec 9 12:19:29 2009 UTC (14 years, 5 months ago) by michele
Branch: MAIN
Changes since 1.2: +40 -7 lines
Diff to previous 1.2 (colored)

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

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: +2 -4 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.