Age | Commit message (Collapse) | Author |
|
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
|
|
this makes ldpd open the ioctl socket early so the config parser
can run the SIOCGPWE3 ioctl against the requested interface.
ok claudio@
|
|
where the "wrong" #define was used.
ok dlg@
|
|
OK claudio@ jca@
|
|
Use the macro from route(8) / ospf6d(8) since it works also with argument 0.
OK claudio@
|
|
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.
|
|
|
|
OK claudio@
|
|
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@
|
|
ldpd operates only with the best routes of each IP prefix. In other words,
the routes with the lowest priorities.
When a route with a better priority is detected (possibly with a different
nexthop), we should uninstall the labels from the "old" routes and try
to install a new label for the new route (if there's one available in
the LIB).
In this specific case, ldpd was failing to uninstall the labels from the
old routes because it wasn't keeping track of each route's priority in
lde. With this missing bit of information, the parent process had no way
to get the correct label to uninstall when processing a IMSG_KLABEL_DELETE
message.
|
|
|
|
|
|
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.
|
|
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.
|
|
Nothing really interesting here.
|
|
|
|
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.
|
|
I screwed up everything... trying to fix now.
|
|
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.
|
|
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)
|
|
Pulled from ospfd. Original author: claudio@
|
|
|
|
|
|
And some ifmedia64 fixes.
"move forward" deraadt@
|
|
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@
|
|
ok claudio@
|
|
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@
|
|
This is major rework of the kroute.c code. The idea is remove complexity
from the lde process by making kroute.c advertise only the lowest priority
routes of each prefix.
kroute.c now keeps track of all routes using three different structures:
kroute_prefix, kroute_priority and kroute_node.
kroute_prefix represents a prefix and contains an ordered list of
priorities (kroute_priority) and for each priority there is a list of
nexthops (kroute_node). Arranging the routes using these three structures
allows for the writing of a simpler code, easier to understand.
Whenever a route is removed, if there's another route for the same prefix,
but with a lower priority, this route is immediately sent to lde.
Additional fixes:
* On RTM_CHANGE, remove the old route before installing the new one;
* On IMSG_CTL_KROUTE_ADDR, show all nexthops for multpath routes;
|
|
to properly track connected routes on -current.
|
|
There's no need to protect the 127/8 network on ldpd since this network
is filtered before being sent to lde.
If we receive a label mapping for this network, it won't be installed
because lde has no nexthop for it, and thus the code will always fall
into the LMp.13 case of the RFC "Receive Label Mapping" algorithm:
the mapping will be recorded but not used.
ok claudio@
|
|
|
|
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:
----------------------------------------------------------------------
|
|
Although RFC 5036 is not explicit about this, LDP should not assign
labels for BGP routes. Doing that would be very resource consuming
in some scenarios and unnecessary. The goal is generally only to
establish LSPs among all PEs in the AS since LDP is not used as an
end in itself but as a means to implement advanced solutions like
MPLS L2/L3 VPNs. Some implementations (e.g. JunOS) go further and
only assign labels for /32 loopback routes advertised in the IGP.
If Inter-AS LSPs are necessary, BGP itself should be used for
distributing IPv4 labeled routes (e.g. option C. of section 10 in
RFC 4364).
|
|
are less then sizeof(*rtm) bytes long (e.g. interface announcements).
Found the hard way by phessler@
|
|
|
|
sleep on a socket.
|
|
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
|
|
inconsistent usage in route(8) noted by Gregor Best (gbe (at) ring0.de)
|
|
|
|
After discussing with claudio@ we came to the conclusion that it's
more safe to ignore the default route and don't bind a label for
it.
OK @claudio
|
|
OK claudio@
|
|
Renato Westphal. Diff by Renato Westphal
|
|
interfaces to guarantee PHP. With this 'fib-update no' is not totaly
broken because of missing mappings for the loopbacks.
Diff by Renato Westphal
|
|
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
|
|
super verbose mode.
From Renato Westphal
|
|
OK dlg@
|
|
it needs to be set to 0 afterwards again, because the FIB was decoupled
right before and now no "route vanished before delete" messages are
printed on shutdown.
|
|
routing daemons. Change the way the kroute tree is indexed (by FEC with
a linked list in case there is a priority conflict -- same route + nexthop
at different priorities). This needs a mpath capable MPLS routing table.
Still work in progress but works a lot better in close meshed networks.
|
|
The kernel has now a static entry for them and they should not hit the
wire anyway.
|
|
This started manly because of ldpctl beeing inconsistent and me misstyping
lfib almost every time.
OK michele@
|