BGP origin attribute

Ondrej Zajicek santiago at crfreenet.org
Thu May 31 16:10:57 CEST 2018


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: santiago at 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."



More information about the Bird-users mailing list