On Thu, May 31, 2018 at 03:14:40AM +0000, Arvin Gan wrote:
> Hi All,
>   I notice the origin attribute in function bgp_update_attrs , if route 
> source  is BGP, I think it should set as ORIGIN_IGP, not INCOMPLETE, 
> according to RFC or Cisco device . It seems there is mistake on Line 1443 in 
> attrs.c .

Hi

I think the current behavior is correct.

If the route is from IGP (OSPF, RIP, Babel ..) -> src is NULL -> use ORIGIN_IGP

If the route is from BGP, then it should already have bgp_origin -> do nothing

If the route is from BGP but bgp_origin attribute was removed by filters -> use 
ORIGIN_INCOMPLETE.


> Line 1443:
> bgp_set_attr_u32(&attrs, pool, BA_ORIGIN, 0, src ? ORIGIN_INCOMPLETE : 
> ORIGIN_IGP);
> 
> ð  bgp_set_attr_u32(&attrs, pool, BA_ORIGIN, 0, src ? ORIGIN_IGP : 
> ORIGIN_INCOMPLETE ); // correct?

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."

Reply via email to