OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.28 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:13 2023 UTC (14 months, 3 weeks ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.27: +1 -3 lines
Diff to previous 1.27 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.27 / (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_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.26: +4 -1 lines
Diff to previous 1.26 (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.26 / (download) - annotate - [select for diffs], Sat Jun 18 17:31:32 2016 UTC (7 years, 11 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.25: +22 -20 lines
Diff to previous 1.25 (colored)

Fix removal of dual-stack neighbors.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Jun 18 17:11:37 2016 UTC (7 years, 11 months ago) by renato
Branch: MAIN
Changes since 1.24: +9 -2 lines
Diff to previous 1.24 (colored)

Fix use after free bug.

Revision 1.24 / (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.23: +17 -5 lines
Diff to previous 1.23 (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.23 / (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.22: +8 -5 lines
Diff to previous 1.22 (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.22 / (download) - annotate - [select for diffs], Mon May 23 19:14:03 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.21: +2 -1 lines
Diff to previous 1.21 (colored)

Update copyright information.

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

Remove superfluous includes.

Revision 1.20 / (download) - annotate - [select for diffs], Mon May 23 19:09:25 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.19: +11 -12 lines
Diff to previous 1.19 (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.19 / (download) - annotate - [select for diffs], Mon May 23 18:58:48 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.18: +50 -28 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Mon May 23 18:55:21 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.17: +1 -3 lines
Diff to previous 1.17 (colored)

Assorted fixes and small cleanup.

Nothing really interesting here.

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

Enable changing the router-id via config reload.

Now ldpd can start without a router-id, since it can be set later. Since
a router-id of 0.0.0.0 is invalid, interfaces and targeted-neighbors
will check for a valid router-id in order to be activated.

When the router-id is changed, all the neighborships are reset.

Revision 1.16 / (download) - annotate - [select for diffs], Mon May 23 18:33:56 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.15: +35 -6 lines
Diff to previous 1.15 (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.15 / (download) - annotate - [select for diffs], Mon May 23 18:28:22 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.14: +5 -5 lines
Diff to previous 1.14 (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.14 / (download) - annotate - [select for diffs], Mon May 23 17:43:42 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.13: +3 -4 lines
Diff to previous 1.13 (colored)

Fix mess caused by my commit script.

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

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

Remove unnecessary mirroring of sockets.

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

Simplify removal of targeted neighbors and adjacencies.

Unlink these structures inside their own delete function rather than from
the outside.

Revision 1.11 / (download) - annotate - [select for diffs], Mon May 23 16:20:59 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (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.10 / (download) - annotate - [select for diffs], Mon May 23 15:57:50 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.9: +4 -12 lines
Diff to previous 1.9 (colored)

Remove duplicated code in timer functions.

Revision 1.9 / (download) - annotate - [select for diffs], Mon May 23 15:47:24 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.8: +15 -62 lines
Diff to previous 1.8 (colored)

Move some code around.

This patch doesn't introduce any logical change.

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

Replace manually written function names with __func__.

Revision 1.7 / (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.6: +5 -3 lines
Diff to previous 1.6 (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.6 / (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.5: +3 -3 lines
Diff to previous 1.5 (colored)

Add configuration reload support.

ok claudio@

Revision 1.5 / (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.4: +19 -9 lines
Diff to previous 1.4 (colored)

Assorted fixes and code cleanup for targeted neighbors.

ok claudio@

Revision 1.4 / (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.3: +2 -3 lines
Diff to previous 1.3 (colored)

Remove unused parameter from adj_new().

The adjacency holdtime is set in recv_hello().

OK claudio@

Revision 1.3 / (download) - annotate - [select for diffs], Tue Oct 15 20:21:24 2013 UTC (10 years, 7 months ago) by renato
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.2: +9 -5 lines
Diff to previous 1.2 (colored)

Fix whitespace and other style issues.
OK claudio@

Revision 1.2 / (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.1: +4 -4 lines
Diff to previous 1.1 (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.1 / (download) - annotate - [select for diffs], Tue Jun 4 13:16:21 2013 UTC (11 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4

I screwed up and forgot to commit this new file :(

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.