Up to [local] / src / usr.sbin / ldpd
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.79 / (download) - annotate - [select for diffs], Tue Jan 19 15:59:25 2021 UTC (3 years, 4 months ago) by claudio
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,
HEAD
Changes since 1.78: +1 -3 lines
Diff to previous 1.78 (colored)
Adjust the disc_recv_packet() code to not use IBUF_READ_SIZE and to use a local recv_buf that is allocated on first call with malloc(). The memory returned from malloc() is properly aligned which may not be the case for bss or stack memory.
Revision 1.78 / (download) - annotate - [select for diffs], Tue Jan 19 15:14:35 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.77: +3 -2 lines
Diff to previous 1.77 (colored)
Do the same control cleanup as in other daemons. Move ctl_conns exclusivly into control.c
Revision 1.77 / (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_6_8_BASE,
OPENBSD_6_8,
OPENBSD_6_7_BASE,
OPENBSD_6_7
Changes since 1.76: +2 -1 lines
Diff to previous 1.76 (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.76 / (download) - annotate - [select for diffs], Wed Jan 23 02:02:04 2019 UTC (5 years, 4 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE,
OPENBSD_6_6,
OPENBSD_6_5_BASE,
OPENBSD_6_5
Changes since 1.75: +6 -9 lines
Diff to previous 1.75 (colored)
rework how tcp md5 signatures are configured. previously ldpd only allowed tcp md5 to be configured against a neighbor (by ldp router id), but other vendors supported configuring tcp md5sig by prefix as well as neighbor. this reworks the config so auth is maintained globally as a list of prefixes that you do and do not want to do tcp md5sig auth with. the config statements look more like what is in bgpd.conf now too. an example of the new config for interoperating with my baby cisco test network: on ios: mpls ldp password required for MPLS mpls ldp password option 1 for MPLS key-chain LDPAUTH key chain LDPAUTH key 1 key-string secret interface Loopback0 ip address 192.168.0.0 255.255.255.255 end ip prefix-list MPLS seq 5 permit 192.168.0.0/24 ip access-list standard MPLS mpls ldp router-id Loopback0 force and in ldpd.conf: router-id 192.168.0.25 tcp md5sig password secret 192.168.0.0/24 address-family ipv4 { interface vmx1 } this still supports specifying tcp md5sig on neighbors, but that is syntactic sugar around adding entries to the list of auths. ok (and lots of help from) claudio@
Revision 1.75 / (download) - annotate - [select for diffs], Sat Mar 4 00:21:48 2017 UTC (7 years, 3 months ago) by renato
Branch: MAIN
CVS Tags: 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.74: +2 -1 lines
Diff to previous 1.74 (colored)
Send VPLS MAC withdrawals. RFC 4762 says that MAC address withdrawal messages can be used to improve convergence time in VPLS networks. This patch makes ldpd send MAC withdrawals whenever a non-pseudowire interface pertaining to a VPLS goes down. The processing of received MAC withdrawals will be implemented later.
Revision 1.74 / (download) - annotate - [select for diffs], Sat Mar 4 00:15:35 2017 UTC (7 years, 3 months ago) by renato
Branch: MAIN
Changes since 1.73: +3 -1 lines
Diff to previous 1.73 (colored)
Implement RFC 5919 (LDP End-of-LIB).
Revision 1.73 / (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.72: +2 -1 lines
Diff to previous 1.72 (colored)
Implement RFC 5918 (Typed Wildcard FEC).
Revision 1.72 / (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.71: +6 -1 lines
Diff to previous 1.71 (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.71 / (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.70: +2 -4 lines
Diff to previous 1.70 (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.70 / (download) - annotate - [select for diffs], Fri Mar 3 23:30:57 2017 UTC (7 years, 3 months ago) by renato
Branch: MAIN
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored)
Allow to specify an alternate control socket. This is required to run multiple instances of ldpd. OK claudio@
Revision 1.69 / (download) - annotate - [select for diffs], Sat Sep 3 16:07:08 2016 UTC (7 years, 9 months ago) by renato
Branch: MAIN
Changes since 1.68: +3 -2 lines
Diff to previous 1.68 (colored)
Rework the sending of address messages. * Respect the session's negotiated maximum pdu length and split the sending of our local addresses into multiple messages if necessary; * Log sent/received addresses; * Add new wrappers to send only one address (send_address_single) and to send all addresses of the given address-family (send_address_all). These wrappers create a temporary list of addresses to be sent, and send_address() then acts on this last.
Revision 1.68 / (download) - annotate - [select for diffs], Fri Sep 2 17:10:34 2016 UTC (7 years, 9 months ago) by renato
Branch: MAIN
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (colored)
lde() and ldpe() should return void. Remove these leftovers from the pre-fork+exec era. Spotted by and ok rzalamena@ ok claudio@
Revision 1.67 / (download) - annotate - [select for diffs], Sat Jul 16 19:24:30 2016 UTC (7 years, 10 months ago) by renato
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE,
OPENBSD_6_0
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored)
Remove potential overflow when validating message's length. Also, use uint16_t for msg_type on gen_msg_hdr().
Revision 1.66 / (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.65: +2 -1 lines
Diff to previous 1.65 (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.65 / (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.64: +2 -2 lines
Diff to previous 1.64 (colored)
Several minor tweaks.
Revision 1.64 / (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.63: +7 -1 lines
Diff to previous 1.63 (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.63 / (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.62: +3 -3 lines
Diff to previous 1.62 (colored)
Handle ibuf_add() errors. tweaks from claudio@
Revision 1.62 / (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.61: +2 -2 lines
Diff to previous 1.61 (colored)
Fix removal of dual-stack neighbors.
Revision 1.61 / (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.60: +2 -1 lines
Diff to previous 1.60 (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.60 / (download) - annotate - [select for diffs], Mon Jun 13 20:19:40 2016 UTC (7 years, 11 months ago) by renato
Branch: MAIN
Changes since 1.59: +3 -1 lines
Diff to previous 1.59 (colored)
Implement a timeout for the session initialization FSM. This prevents neighbors stuck in the initialization FSM to linger forever as long as the associated transport connection is up. This timeout can be seen in the 'Session Initialization State Transition Diagram' of RFC 5036. The RFC, however, doesn't specify how much we should wait. Let's use 180 seconds for that, the default LDP hold time. Fixes IxANVL LDP test 6.15.
Revision 1.59 / (download) - annotate - [select for diffs], Sat Jun 11 01:46:36 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.58: +3 -3 lines
Diff to previous 1.58 (colored)
Use uint16_t for notification type. This doesn't fix any bug as we were already using uint16_t everywhere else.
Revision 1.58 / (download) - annotate - [select for diffs], Thu Jun 9 17:26:32 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (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.57 / (download) - annotate - [select for diffs], Mon May 23 19:20:55 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.56: +2 -1 lines
Diff to previous 1.56 (colored)
Add support for manually resetting neighbors.
Revision 1.56 / (download) - annotate - [select for diffs], Mon May 23 19:16:00 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)
Improve security by calling exec after fork. For each child process (lde and ldpe), re-exec ldpd with a special "per-role" getopt flag. This way we have seperate ASLR/cookies per process. Based on a similar patch for bgpd, from claudio@ Requested by deraadt@
Revision 1.55 / (download) - annotate - [select for diffs], Mon May 23 19:14:03 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.54: +3 -1 lines
Diff to previous 1.54 (colored)
Update copyright information.
Revision 1.54 / (download) - annotate - [select for diffs], Mon May 23 19:11:42 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.53: +8 -7 lines
Diff to previous 1.53 (colored)
Remove superfluous includes.
Revision 1.53 / (download) - annotate - [select for diffs], Mon May 23 19:09:25 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.52: +49 -79 lines
Diff to previous 1.52 (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.52 / (download) - annotate - [select for diffs], Mon May 23 18:58:48 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.51: +58 -40 lines
Diff to previous 1.51 (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.51 / (download) - annotate - [select for diffs], Mon May 23 18:55:21 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.50: +2 -3 lines
Diff to previous 1.50 (colored)
Assorted fixes and small cleanup. Nothing really interesting here.
Revision 1.50 / (download) - annotate - [select for diffs], Mon May 23 18:41:59 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.49: +2 -1 lines
Diff to previous 1.49 (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.49 / (download) - annotate - [select for diffs], Mon May 23 18:40:15 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.48: +3 -1 lines
Diff to previous 1.48 (colored)
Several fixes in the config reload handling.
Revision 1.48 / (download) - annotate - [select for diffs], Mon May 23 18:33:56 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.47: +10 -7 lines
Diff to previous 1.47 (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.47 / (download) - annotate - [select for diffs], Mon May 23 17:43:42 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.46: +47 -48 lines
Diff to previous 1.46 (colored)
Fix mess caused by my commit script. I screwed up everything... trying to fix now.
Revision 1.46 / (download) - annotate - [select for diffs], Mon May 23 16:16:44 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.45: +12 -2 lines
Diff to previous 1.45 (colored)
Rework the way we handle income connection requests. The logic of the previous code was to accept all TCP connection requests (destined to port 646) and create a tcp_conn structure for each them. Once the first packet of a connection was received, we would analyze the LDP Initialization message and identify its origin by looking at the LSR-ID field. When parsing a received TCP packet, we would need to distinguish between two cases: tcp packet from an LDP neighbor and tcp packet from a newborn connection (not associated with any neighbor yet). For this reason, the session_read() function was quite complicated. Also, we were not keeping track of the allocated tcp_conn structures. So, we were subject to memory leaks and even DOS attacks. With this patch, we also accept all TCP connection requests, but with two major differences: * We identify the neighbor by the source address of the SYN packet. This is possible because we don't support label spaces, so the transport-address by itself is enough to identify a neighbor, we don't need to wait for the Initialization message; * If there's no matching adjacency for this neighbor, then we start a timer of 5 seconds. If we receive a Hello packet from this neighbor within this interval, then we stop this timer and move on in the Initialization state machine. Otherwise, we send a No Hello Notification message and close the socket. We try to avoid sending the No Hello notification as much as possible because it triggers the backoff exponential in the remote peer, which considerably slow down the session establishment process. In summary, this new approach allows for a simpler code and fixes the memory leak problem mentioned before.
Revision 1.45 / (download) - annotate - [select for diffs], Mon May 23 15:47:24 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.44: +8 -3 lines
Diff to previous 1.44 (colored)
Move some code around. This patch doesn't introduce any logical change.
Revision 1.44 / (download) - annotate - [select for diffs], Mon May 23 15:43:11 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.43: +4 -3 lines
Diff to previous 1.43 (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.43 / (download) - annotate - [select for diffs], Mon May 23 15:41:04 2016 UTC (8 years ago) by renato
Branch: MAIN
Changes since 1.42: +2 -1 lines
Diff to previous 1.42 (colored)
Allow setting the session holdtime per neighbor.
Revision 1.42 / (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.41: +3 -8 lines
Diff to previous 1.41 (colored)
Rename, move and reuse mapping list functions. ok claudio@
Revision 1.41 / (download) - annotate - [select for diffs], Tue Jul 21 04:58:48 2015 UTC (8 years, 10 months ago) by renato
Branch: MAIN
Changes since 1.40: +2 -1 lines
Diff to previous 1.40 (colored)
Fix some awful ipc synchronization issues. Under some rare circumstances the following can happen: 1 - one neighbor sends a label withdraw followed by a fatal notification message; 2 - ldpe parses the label withdraw and sends it to lde; 3 - ldpe parses the fatal notification message and closes the session; 4 - lde processes the label withdraw and asks ldpe to send a label release; 5 - at around the same time, ldpe restarts the session with the neighbor; 6 - ldpe processes the lde message and then sends a label release to the new neighbor. The problem is that we don't want a message enqueue to a neighbor to be sent after the session is restarted. If a session is closed, all the enqueued messages should be discarded. To acomplish this, we update the peerid of the nbr structure everytime the session is established. ok claudio@
Revision 1.40 / (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.39: +12 -1 lines
Diff to previous 1.39 (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.39 / (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.38: +4 -4 lines
Diff to previous 1.38 (colored)
Add configuration reload support. ok claudio@
Revision 1.38 / (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.37: +3 -2 lines
Diff to previous 1.37 (colored)
Assorted fixes and code cleanup for targeted neighbors. ok claudio@
Revision 1.37 / (download) - annotate - [select for diffs], Tue Jul 21 04:39:28 2015 UTC (8 years, 10 months ago) by renato
Branch: MAIN
Changes since 1.36: +3 -1 lines
Diff to previous 1.36 (colored)
Improve handling of addresses on ldpe. This is a preliminary work for the the next patch (sigup config reload). We want to make sure that the ldpe process can handle duplicated addresses. The idea is to alloc two different if_addr structures for each address, and link one in the global list of addresses (used to send address messages) and link the other to the associated interface list of addresses. Doing that we will be able to call kif_redistribute() after reloading the config file and activate the new LDP enabled interfaces. NOTE: Interfaces are created at config parse time and the child processes inherit them on fork() so there's no need to send a status update at startup. ok claudio@
Revision 1.36 / (download) - annotate - [select for diffs], Sun Jul 19 21:01:56 2015 UTC (8 years, 10 months ago) by renato
Branch: MAIN
Changes since 1.35: +27 -1 lines
Diff to previous 1.35 (colored)
Implement md5 authentication support. ok claudio@
Revision 1.35 / (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.34: +2 -3 lines
Diff to previous 1.34 (colored)
Remove unused parameter from adj_new(). The adjacency holdtime is set in recv_hello(). OK claudio@
Revision 1.34 / (download) - annotate - [select for diffs], Sat Mar 21 18:34:01 2015 UTC (9 years, 2 months ago) by renato
Branch: MAIN
Changes since 1.33: +1 -5 lines
Diff to previous 1.33 (colored)
Remove unused variables and functions.
Revision 1.33 / (download) - annotate - [select for diffs], Sat Mar 21 18:32:01 2015 UTC (9 years, 2 months ago) by renato
Branch: MAIN
Changes since 1.32: +4 -2 lines
Diff to previous 1.32 (colored)
Remove interface finite state machine. In the name of simplicity, remove the interface FSM that was inherited from ospfd. In ldpd interfaces are just up or down, so keeping a FSM for that is an overkill. Now instead of calling if_fsm(), just call if_update() whenever a relevant event occurs (status change, address addition/removal). Additional notes: 1 - s/if_act_/if_/ 2 - Remove the IMSG_IFUP and IMSG_IFDOWN events. Now whenever an interface changes its state a IMSG_IFSTATUS event will be generated with the new status. kroute.c ldpd.h ldpe.c ldpe.h CVS: ----------------------------------------------------------------------
Revision 1.32 / (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.31: +1 -2 lines
Diff to previous 1.31 (colored)
Remove unnecessary netinet/in_systm.h include. ok millert@
Revision 1.31 / (download) - annotate - [select for diffs], Thu Oct 17 17:52:21 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.30: +2 -6 lines
Diff to previous 1.30 (colored)
Respect the max pdu length and merge all send_label* functions into a single generic function.
Revision 1.30 / (download) - annotate - [select for diffs], Thu Oct 17 17:47:04 2013 UTC (10 years, 7 months ago) by renato
Branch: MAIN
Changes since 1.29: +3 -8 lines
Diff to previous 1.29 (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.29 / (download) - annotate - [select for diffs], Tue Oct 15 20:21:26 2013 UTC (10 years, 7 months ago) by renato
Branch: MAIN
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)
Fix whitespace and other style issues. OK claudio@
Revision 1.28 / (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.27: +2 -2 lines
Diff to previous 1.27 (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.27 / (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.26: +17 -9 lines
Diff to previous 1.26 (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.26 / (download) - annotate - [select for diffs], Tue Jun 4 02:28:27 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.25: +1 -6 lines
Diff to previous 1.25 (colored)
Cleanup ctl commands and remove unused variables inherited from ospfd From Renato Westphal
Revision 1.25 / (download) - annotate - [select for diffs], Tue Jun 4 02:25:28 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.24: +40 -12 lines
Diff to previous 1.24 (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.24 / (download) - annotate - [select for diffs], Tue Jun 4 01:32:16 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.23: +2 -1 lines
Diff to previous 1.23 (colored)
Properly implement the exponential backoff timer on session initialization According with the section 2.5.3 of RFC 5036, an LSR must throttle its session setup retry attempts with an exponential backoff in situations where Initialization messages are being NAK'd (because of disagreements on session parameters). It doesn't mention using this procedure for TCP connection failures. With that said, start the inactive delay timer only after receiving an appropriate notification message. When playing the active role of the initialization process, throttle the session setup retry attempts by not connecting to the remote peer. When playing the passive role, throttle the session setup retry attempts by delaying the processing of the received Initialization message. Diff by Renato Westphal, adjusted by myself
Revision 1.23 / (download) - annotate - [select for diffs], Tue Jun 4 00:56:49 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (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.22 / (download) - annotate - [select for diffs], Mon Jun 3 16:53:49 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.21: +5 -7 lines
Diff to previous 1.21 (colored)
Implement support for multiple addresses per interface. This replaces the way addresses and interface are chained together. In ospfd there was a 1 to 1 mapping (with iface clones) but LDP does not have that limitation. Diff from Renato Westphal
Revision 1.21 / (download) - annotate - [select for diffs], Sat Jun 1 19:28:55 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.20: +2 -3 lines
Diff to previous 1.20 (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.20 / (download) - annotate - [select for diffs], Sat Jun 1 18:47:07 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.19: +5 -7 lines
Diff to previous 1.19 (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.19 / (download) - annotate - [select for diffs], Sat Jun 1 18:16:35 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)
After returning from accept, we got a TCP connection not a LDP session. Rename event/actions in the discovery FSM to avoid confusion * NBR_EVT_SESSION_UP -> NBR_EVT_CONNECT_UP * NBR_ACT_SESSION_EST -> NBR_ACT_CONNECT_SETUP * nbr_act_session_establish -> nbr_act_connect_setup * NBR_ACT_INIT_SEND -> NBR_ACT_PASSIVE_INIT * NBR_ACT_STRT_KTIMER -> NBR_ACT_SESSION_EST Diff by Renato Westphal
Revision 1.18 / (download) - annotate - [select for diffs], Sat Jun 1 01:34:57 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.17: +2 -1 lines
Diff to previous 1.17 (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.17 / (download) - annotate - [select for diffs], Fri May 31 14:10:10 2013 UTC (11 years ago) by claudio
Branch: MAIN
Changes since 1.16: +4 -1 lines
Diff to previous 1.16 (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.16 / (download) - annotate - [select for diffs], Thu Apr 12 17:33:43 2012 UTC (12 years, 2 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE,
OPENBSD_5_3,
OPENBSD_5_2_BASE,
OPENBSD_5_2
Changes since 1.15: +8 -1 lines
Diff to previous 1.15 (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.15 / (download) - annotate - [select for diffs], Sat Mar 12 01:57:13 2011 UTC (13 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE,
OPENBSD_5_1,
OPENBSD_5_0_BASE,
OPENBSD_5_0
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (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.14 / (download) - annotate - [select for diffs], Mon Jan 10 12:28:25 2011 UTC (13 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE,
OPENBSD_4_9
Changes since 1.13: +5 -6 lines
Diff to previous 1.13 (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.13 / (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.12: +1 -2 lines
Diff to previous 1.12 (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.12 / (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.11: +2 -4 lines
Diff to previous 1.11 (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.11 / (download) - annotate - [select for diffs], Mon Sep 6 08:28:43 2010 UTC (13 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.10: +1 -5 lines
Diff to previous 1.10 (colored)
The nbr_reset_*() timer fucntions are the same as the nbr_start_* function. So replace the few calls to the reset function with nbr_start_*(). OK michele@
Revision 1.10 / (download) - annotate - [select for diffs], Wed May 26 13:56:08 2010 UTC (14 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE,
OPENBSD_4_8
Changes since 1.9: +5 -5 lines
Diff to previous 1.9 (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.9 / (download) - annotate - [select for diffs], Wed May 19 15:28:51 2010 UTC (14 years ago) by claudio
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (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.8 / (download) - annotate - [select for diffs], Fri May 14 13:49:09 2010 UTC (14 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)
Do not send notifications directly onto the wire. Decide in the caller how to send the notification. On accept use write() else queue message and try to send the queued messages out via msgbuf_write(). This may still fail but is better then the code beforehands. OK michele@
Revision 1.7 / (download) - annotate - [select for diffs], Thu Apr 15 15:04:23 2010 UTC (14 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.6: +1 -2 lines
Diff to previous 1.6 (colored)
Instead of having three ways of setting fds non-blocking use session_socket_blockmode() everywhere. Additionally make two fatal() distinguishable. OK michele@
Revision 1.6 / (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.5: +8 -9 lines
Diff to previous 1.5 (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.5 / (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.4: +2 -1 lines
Diff to previous 1.4 (colored)
Correctly encode FEC prefixes. This makes my test setup much happyer. OK michele
Revision 1.4 / (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.3: +12 -12 lines
Diff to previous 1.3 (colored)
Make send_* functions return void (and not int) as they can just succeed or fatal(). ok claudio@
Revision 1.3 / (download) - annotate - [select for diffs], Sat Feb 20 21:05:00 2010 UTC (14 years, 3 months ago) by michele
Branch: MAIN
Changes since 1.2: +1 -10 lines
Diff to previous 1.2 (colored)
Remove unneeded abstraction in neighbor fsm. ok claudio@
Revision 1.2 / (download) - annotate - [select for diffs], Fri Jun 5 22:34:45 2009 UTC (15 years ago) by michele
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE,
OPENBSD_4_6
Changes since 1.1: +5 -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@