OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.34 / (download) - annotate - [select for diffs], Tue Mar 21 12:06:55 2017 UTC (7 years, 2 months ago) by bluhm
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, 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, HEAD
Changes since 1.33: +6 -6 lines
Diff to previous 1.33 (colored)

From a syslog perspective it does not make sense to log fatal and
warn with the same severity.  Switch log_warn() to LOG_ERR and keep
fatal() at LOG_CRIT.
OK reyk@ florian@

Revision 1.33 / (download) - annotate - [select for diffs], Fri Jan 20 12:19:18 2017 UTC (7 years, 4 months ago) by benno
Branch: MAIN
Changes since 1.32: +9 -448 lines
Diff to previous 1.32 (colored)

work on making log.c similar in all daemons:

move daemon-local functions into new logmsg.c, and reduce
the (mostly whitespace) differences so that log.c's can be diffed easily.

removal of log_rtmsg() aproved by claudio@

ok claudio@ krw@

Revision 1.32 / (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.31: +34 -1 lines
Diff to previous 1.31 (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.31 / (download) - annotate - [select for diffs], Mon Aug 8 21:42:13 2016 UTC (7 years, 9 months ago) by renato
Branch: MAIN
Changes since 1.30: +2 -5 lines
Diff to previous 1.30 (colored)

Use exit(3) instead of _exit(2) in the child processes.

Since recently the child processes call exec() after fork(), so they should
stop using _exit(2) and use exit(3) instead when shutting down.

Ok claudio@

Revision 1.30 / (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.29: +2 -14 lines
Diff to previous 1.29 (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.29 / (download) - annotate - [select for diffs], Fri Jul 15 17:09:25 2016 UTC (7 years, 10 months ago) by renato
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.28: +131 -94 lines
Diff to previous 1.28 (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.28 / (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.27: +2 -2 lines
Diff to previous 1.27 (colored)

More renaming and whitespace cleanup.

No binary change after "strip -s".

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

Remove superfluous includes.

Revision 1.26 / (download) - annotate - [select for diffs], Mon May 23 19:09:25 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.25: +6 -4 lines
Diff to previous 1.25 (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.25 / (download) - annotate - [select for diffs], Mon May 23 18:58:48 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.24: +116 -10 lines
Diff to previous 1.24 (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.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 -3 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 18:33:56 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.22: +16 -1 lines
Diff to previous 1.22 (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.22 / (download) - annotate - [select for diffs], Mon May 23 17:43:42 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.21: +4 -4 lines
Diff to previous 1.21 (colored)

Fix mess caused by my commit script.

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

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

Rework L2VPN code.

Revision 1.20 / (download) - annotate - [select for diffs], Mon May 23 16:20:59 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (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.19 / (download) - annotate - [select for diffs], Mon May 23 16:12:28 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Mon May 23 15:47:24 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.17: +21 -1 lines
Diff to previous 1.17 (colored)

Move some code around.

This patch doesn't introduce any logical change.

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

Fix logging of wildcard label mappings.

If snprintf fails, a value less than 0 is returned.

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

Replace manually written function names with __func__.

Revision 1.15 / (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.14: +82 -9 lines
Diff to previous 1.14 (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.14 / (download) - annotate - [select for diffs], Sun Jul 19 20:54:17 2015 UTC (8 years, 10 months ago) by renato
Branch: MAIN
Changes since 1.13: +4 -1 lines
Diff to previous 1.13 (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.13 / (download) - annotate - [select for diffs], Mon Nov 3 18:44:36 2014 UTC (9 years, 7 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.12: +1 -3 lines
Diff to previous 1.12 (colored)

Convert the logic in yyerror().  Instead of creating a temporary
format string, create a temporary message.
OK claudio@

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_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.11: +1 -3 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], Sat Jun 1 20:13:04 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.10: +36 -2 lines
Diff to previous 1.10 (colored)

Filter out route messages we don't need and log kernel messages in
super verbose mode.
From Renato Westphal

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jun 1 18:26:40 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.9: +1 -3 lines
Diff to previous 1.9 (colored)

Don't allow enabling LDP on loopback and carp interfaces.
LDP should be allowed only on physical or tunnel interfaces.
Diff by Renato Westphal

Revision 1.9 / (download) - annotate - [select for diffs], Sat Aug 20 19:02:28 2011 UTC (12 years, 9 months ago) by sthen
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
Changes since 1.8: +1 -2 lines
Diff to previous 1.8 (colored)

Decouple log_verbose() from log_init() so the verbose flag stays set with
"-v" (previously only "-vd" worked). Similar to recent ospfd commit.
ok claudio@

Revision 1.8 / (download) - annotate - [select for diffs], Thu Sep 2 14:34:04 2010 UTC (13 years, 9 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.7: +1 -3 lines
Diff to previous 1.7 (colored)

NBR_STA_SESSION, NBR_STA_UP, and NBR_STA_ACTIVE represent all the same
group of states (all but NBR_STA_DOWN). Clean up this confusion and remove
NBR_STA_UP and NBR_STA_ACTIVE.
OK michele@

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jun 10 13:22:25 2010 UTC (13 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

No need to print FEC twice. Remove it in the log function.

Revision 1.6 / (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.5: +20 -1 lines
Diff to previous 1.5 (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.5 / (download) - annotate - [select for diffs], Thu Apr 29 12:09:28 2010 UTC (14 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.4: +1 -7 lines
Diff to previous 1.4 (colored)

Remove some more ospfd-ism from the interface code. This time remove
of most of the IF_TYPE_ special cases and most interface types.
Point-to-point and broadcast still present because of find_iface()
which needs addtional fixing.
OK michele@

Revision 1.4 / (download) - annotate - [select for diffs], Thu Apr 15 15:44:37 2010 UTC (14 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.3: +65 -1 lines
Diff to previous 1.3 (colored)

Log recieved notifications in a human understanable way. Makes debugging
a bit easier.
OK michele@

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

Cleanup the interface FSM by removing most of the ospfd specific states
that have nothing to do with LDP.
OK michele@

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

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

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

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.