[quagga-dev 10354] Re: [PATCH] ospfd: restore nexthop IP for p2p interfaces

David Lamparter equinox at opensourcerouting.org
Wed Mar 20 19:30:15 GMT 2013


On Wed, Mar 20, 2013 at 11:23:21AM -0700, James Li wrote:
> I'm doing the exact same thing in a local diff I have to support 
> unnumbered interface in ospfd.

Ah, great.  Can you post the diff for comparison?  It's rather easy to
break stuff here, being able to cross-reference is useful.

> p2p over LAN is important. The original code iterates the links on the 
> peer router LSA, trying to match a local link with an IP address. That 
> doesn't work for unnumbered since there is no IP address. So the same 
> approach is taken to use the src IP address of the neighbor.

Yeah, I figured Cumulus may have code relating to this; that's why Scott
was in Cc:.

Cheers,


David


> > -		  added = 1;
> > -		  nexthop.s_addr = 0; /* Nexthop not required */
> > +		  /* Having nexthop = 0 is tempting, but NOT acceptable.
> > +		     It breaks AS-External routes with a forwarding address,
> > +		     since ospf_ase_complete_direct_routes() will mistakenly
> > +		     assume we've reached the last hop and should place the
> > +		     forwarding address as nexthop.
> > +		     Also, users may configure multi-access links in p2p mode,
> > +		     so we need the IP to ARP the nexthop.
> > +		  */
> > +		  struct ospf_neighbor *nbr_w;
> > +
> > +		  nbr_w = ospf_nbr_lookup_by_routerid (oi->nbrs, &l->link_id);
> > +		  if (nbr_w != NULL)
> > +		    {
> > +		      added = 1;
> > +		      nexthop = nbr_w->src;
> > +		    }




More information about the Quagga-dev mailing list