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).
---
kroute.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kroute.c b/kroute.c
index f5772e7..679f66d 100644
--- a/kroute.c
+++ b/kroute.c
@@ -1250,6 +1250,8 @@ rtmsg_process(char *buf, size_t len)
if (rtm->rtm_flags & RTF_MPATH)
mpath = 1;
prio = rtm->rtm_priority;
+ if (prio == RTP_BGP)
+ continue;
switch (sa->sa_family) {
case AF_INET:
--
1.9.1