diff options
author | Renato Westphal <renato@cvs.openbsd.org> | 2015-03-21 18:20:20 +0000 |
---|---|---|
committer | Renato Westphal <renato@cvs.openbsd.org> | 2015-03-21 18:20:20 +0000 |
commit | 3721ece19af5fd3370a2554fccc7e9780608e0af (patch) | |
tree | ea72ff204bd13162fa584fcd2654ca319d02816f /usr.sbin/ldpd/kroute.c | |
parent | a0cfbc7c809d309a59fee69668febb829332732e (diff) |
ldpd: Don't assign labels for BGP routes.
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).
Diffstat (limited to 'usr.sbin/ldpd/kroute.c')
-rw-r--r-- | usr.sbin/ldpd/kroute.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/ldpd/kroute.c b/usr.sbin/ldpd/kroute.c index 1bb1aeaaec8..c707b9e8643 100644 --- a/usr.sbin/ldpd/kroute.c +++ b/usr.sbin/ldpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.37 2015/02/11 05:56:51 claudio Exp $ */ +/* $OpenBSD: kroute.c,v 1.38 2015/03/21 18:20:19 renato Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -1247,6 +1247,10 @@ rtmsg_process(char *buf, size_t len) if (rtm->rtm_flags & RTF_LLINFO) /* arp cache */ continue; + /* LDP should follow the IGP and ignore BGP routes */ + if (rtm->rtm_priority == RTP_BGP) + continue; + if (rtm->rtm_flags & RTF_MPATH) mpath = 1; prio = rtm->rtm_priority; |