On Wed, Mar 11, 2015 at 04:41:05PM -0300, Renato Westphal wrote:
> 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
> 

A few comments:
- I would prefer that check to be a bit further up as in above the
  RTF_MPATH check and so next to all the other continues.
- Add a comment why we skip RTP_BGP
- Shouldn't this be a more generic kind of filter (since the prio can be
  changed in bgpd)? Or is this overkill?
- Would be nice to use something like the ROUTE_MSGFILTER to filter these
  unwanted messages already in the kernel (esp since bgpd can be a very
  chatty companion)

All in all OK claudio@
-- 
:wq Claudio

Reply via email to