[Xorp-hackers] Here's some bgp config files that work.
Atanu Ghosh
atanu at xorp.org
Thu Apr 22 09:02:46 PDT 2010
Hi,
The test for the nexthop being zero is in
FastPathAttributeList<A>::load_raw_data:
// if there's an NLRI, there must be a non-zero nexthop
if (do_checks && mp4_reach_att->nexthop() == IPv4::ZERO()) {
uint8_t data = NEXT_HOP;
xorp_throw(CorruptMessage,"Illegal nexthop", UPDATEMSGERR,
MISSWATTR, &data, 1);
}
I don't know why it isn't being caught here.
Atanu.
On Tue, Apr 20, 2010 at 2:59 PM, Ben Greear <greearb at candelatech.com> wrote:
> I seem to have BGP working now, at least to some degree.
>
> I fixed one exception that was thrown when route destination
> is 0.0.0.0 (pushed the fix to xorp.ct), and it's included
> below.
>
> The rest of my problems were self-inflicted mis-configuration of
> the peers and export policies.
>
> I'm attaching two working configurations in hopes they prove
> useful to someone. There may still be issues with these,
> but it works enough for BGP to exchange routes and let clients
> attached to the two routers send traffic through them.
>
> Here's the fix for 0.0.0.0 destination. It should also
> just catch the exception and ignore the route instead
> of crash..but that's a fix for another day.
>
> [greearb at ben-dt2 libxorp]$ git diff
> diff --git a/bgp/path_attribute.cc b/bgp/path_attribute.cc
> index f1326b2..b82475c 100644
> --- a/bgp/path_attribute.cc
> +++ b/bgp/path_attribute.cc
> @@ -318,7 +318,7 @@ NextHopAttribute<A>::NextHopAttribute(const uint8_t* d)
>
> _next_hop = A(payload(d));
>
> - if (!_next_hop.is_unicast())
> + if (!(_next_hop.is_unicast() || _next_hop.is_zero()))
> xorp_throw(CorruptMessage,
> c_format("NextHop %s is not a unicast address",
> _next_hop.str().c_str()),
>
>
> Thanks,
> Ben
>
> --
> Ben Greear <greearb at candelatech.com>
> Candela Technologies Inc http://www.candelatech.com
>
>
> _______________________________________________
> Xorp-hackers mailing list
> Xorp-hackers at icir.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
>
>
More information about the Xorp-hackers
mailing list