OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.32 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:13 2023 UTC (15 months 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.31: +1 -3 lines
Diff to previous 1.31 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.31 / (download) - annotate - [select for diffs], Tue Jan 19 15:14:35 2021 UTC (3 years, 4 months ago) by claudio
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
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

Do the same control cleanup as in other daemons. Move ctl_conns exclusivly
into control.c

Revision 1.30 / (download) - annotate - [select for diffs], Mon Jun 22 15:09:34 2020 UTC (3 years, 11 months ago) by mestre
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.29: +2 -3 lines
Diff to previous 1.29 (colored)

On my previous commit I made the wrong assumption that the control socket was
being unlink(2)ed from the main proc so I removed "cpath" from the pledge(2) on
the ldpe proc but actually the socket was unlink(2)ed from here, this means the
daemon would crash on exit due to pledge(2) not having "cpath" permissions
anymore. Finish the job by just not deleting the socket at all during
control_cleanup(), which keeps the control program still working without issues
but more importantly prevents the crash during exit, sorry about that.

Crash reported by wlund at iki.fi

OK deraadt@ claudio@ remi@

Revision 1.29 / (download) - annotate - [select for diffs], Fri Mar 3 23:30:57 2017 UTC (7 years, 3 months ago) by renato
Branch: MAIN
CVS Tags: 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.28: +10 -10 lines
Diff to previous 1.28 (colored)

Allow to specify an alternate control socket.

This is required to run multiple instances of ldpd.

OK claudio@

Revision 1.28 / (download) - annotate - [select for diffs], Sun Jan 8 23:04:42 2017 UTC (7 years, 5 months ago) by krw
Branch: MAIN
Changes since 1.27: +9 -7 lines
Diff to previous 1.27 (colored)

Replace hand-rolled for(;;) traversal of ctl_conns TAILQ with
TAILQ_FOREACH().

No intentional functional change.

ok reyk@

Revision 1.27 / (download) - annotate - [select for diffs], Mon May 23 19:20:55 2016 UTC (8 years ago) by renato
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.26: +8 -1 lines
Diff to previous 1.26 (colored)

Add support for manually resetting neighbors.

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

Remove superfluous includes.

Revision 1.25 / (download) - annotate - [select for diffs], Mon May 23 19:09:25 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.24: +12 -10 lines
Diff to previous 1.24 (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.24 / (download) - annotate - [select for diffs], Mon May 23 18:55:21 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.23: +3 -2 lines
Diff to previous 1.23 (colored)

Assorted fixes and small cleanup.

Nothing really interesting here.

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

Fix mess caused by my commit script.

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

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

Replace manually written function names with __func__.

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

imsg_* returns ssize_t

Pulled from ospfd. Original author: claudio@

Revision 1.19 / (download) - annotate - [select for diffs], Mon May 23 14:55:41 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.18: +3 -1 lines
Diff to previous 1.18 (colored)

Call accept_del() on exit.

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

Call accept_unpause() when any TCP socket is closed.

We were calling accept_unpause() only when an LDP session is shut
down. But, during the LDP session establishment process, we may have
TCP sockets that are not associated with any neighbor. If we close one
of these sockets, we must call accept_unpause() too.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Dec 5 13:11:48 2015 UTC (8 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.16: +3 -2 lines
Diff to previous 1.16 (colored)

EAGAIN handling for imsg_read. OK henning@ benno@

Revision 1.16 / (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_8_BASE, OPENBSD_5_8
Changes since 1.15: +3 -1 lines
Diff to previous 1.15 (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.15 / (download) - annotate - [select for diffs], Mon Feb 9 11:54:24 2015 UTC (9 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.14: +5 -23 lines
Diff to previous 1.14 (colored)

More SOCK_NONBLOCK | SOCK_CLOEXEC love and one less session_socket_blockmode

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jul 11 16:43:33 2014 UTC (9 years, 11 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

Close the control fd when it has reported EOF.

ok henning@

Revision 1.13 / (download) - annotate - [select for diffs], Tue Nov 26 11:59:38 2013 UTC (10 years, 6 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.12: +1 -1 lines
Diff to previous 1.12 (colored)

deal with msgbuf_write EAGAIN, ok gilles benno

Revision 1.12 / (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.11: +4 -1 lines
Diff to previous 1.11 (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.11 / (download) - annotate - [select for diffs], Mon Mar 11 17:40:11 2013 UTC (11 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.10: +3 -2 lines
Diff to previous 1.10 (colored)

handle ECONNABORTED errors from accept().  In many code blocks they can be
ignored silently and without aborting, much like EINTR and EWOULDBLOCK are.
ok's from various maintainers of these directories...

Revision 1.10 / (download) - annotate - [select for diffs], Thu Apr 12 17:33:43 2012 UTC (12 years, 1 month ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.9: +15 -11 lines
Diff to previous 1.9 (colored)

accept pacing ldpd way. Since this daemon has multiple listening fds
we add them all to a accept queue that does the pacing with the
accept_pause() and accept_unpause() calls.
With and OK deraadt@

Revision 1.9 / (download) - annotate - [select for diffs], Wed Sep 1 13:54:54 2010 UTC (13 years, 9 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.8: +3 -5 lines
Diff to previous 1.8 (colored)

s/lfib/fib/ for more consitency with the other routing daemons.
This started manly because of ldpctl beeing inconsistent and me misstyping
lfib almost every time.
OK michele@

Revision 1.8 / (download) - annotate - [select for diffs], Fri May 14 11:52:19 2010 UTC (14 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Use calloc() instead of malloc() to allocate the connection structure. This
way the memory is zeroed. This is equivalent to the relayd commit by reyk.
OK reyk, jsg

Revision 1.7 / (download) - annotate - [select for diffs], Thu Feb 25 21:07:31 2010 UTC (14 years, 3 months ago) by michele
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

Whitespaces cleanup.

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

Kill double declaration of control_imsg_relay().

From Christiano F. Haesbaert.

ok claudio@

Revision 1.5 / (download) - annotate - [select for diffs], Tue Dec 8 15:54:50 2009 UTC (14 years, 6 months ago) by jsg
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

porcesses -> processes

Revision 1.4 / (download) - annotate - [select for diffs], Wed Dec 2 19:10:02 2009 UTC (14 years, 6 months ago) by mk
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

log_warn() consistency.

`OK' claudio

Revision 1.3 / (download) - annotate - [select for diffs], Mon Nov 2 20:34:58 2009 UTC (14 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.2: +16 -1 lines
Diff to previous 1.2 (colored)

More IMSG_CTL_LOG_VERBOSE, still doing the same toggeling of log_debug().

Revision 1.2 / (download) - annotate - [select for diffs], Sat Jun 6 08:09:43 2009 UTC (15 years ago) by pyr
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.1: +23 -22 lines
Diff to previous 1.1 (colored)

make ldpd imsg-in-a-lib ready too.

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.