On 2015/03/13 09:24, Claudio Jeker wrote:
> 
> Can you try the following diff. Not sure if it is right but it seems to
> solve the crash for me.

Yes, that fixes it for me. I also just discovered the hard way that
it doesn't just affect p2p interfaces (I also ran into removing a carp
interface) so when we have enough confidence in it I think it should
go to stable.

Diff makes some sense to me but I have a head cold and my brain is not
quite at 100% today!

> -- 
> :wq Claudio
> 
> Index: ospfd.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/ospfd/ospfd.c,v
> retrieving revision 1.83
> diff -u -p -r1.83 ospfd.c
> --- ospfd.c   10 Feb 2015 05:24:48 -0000      1.83
> +++ ospfd.c   13 Mar 2015 08:13:00 -0000
> @@ -821,6 +821,8 @@ merge_interfaces(struct area *a, struct 
>                           i->name);
>                       if (ospfd_process == PROC_OSPF_ENGINE)
>                               if_fsm(i, IF_EVT_DOWN);
> +                     else if (ospfd_process == PROC_RDE_ENGINE)
> +                             rde_nbr_iface_del(i);
>                       LIST_REMOVE(i, entry);
>                       if_del(i);
>               }
> Index: rde.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/ospfd/rde.c,v
> retrieving revision 1.96
> diff -u -p -r1.96 rde.c
> --- rde.c     12 Jul 2014 20:16:38 -0000      1.96
> +++ rde.c     13 Mar 2015 08:10:42 -0000
> @@ -963,6 +963,22 @@ rde_nbr_new(u_int32_t peerid, struct rde
>  }
>  
>  void
> +rde_nbr_iface_del(struct iface *iface)
> +{
> +     struct rde_nbr_head     *head;
> +     struct rde_nbr          *nbr, *xnbr;
> +     u_int32_t                i;
> +
> +     for (i = 0; i <= rdenbrtable.hashmask; i++) {
> +             head = &rdenbrtable.hashtbl[i];
> +             LIST_FOREACH_SAFE(nbr, head, hash, xnbr) {
> +                     if (nbr->iface == iface)
> +                             rde_nbr_del(nbr);
> +             }
> +     }
> +}
> +
> +void
>  rde_nbr_del(struct rde_nbr *nbr)
>  {
>       if (nbr == NULL)
> Index: rde.h
> ===================================================================
> RCS file: /cvs/src/usr.sbin/ospfd/rde.h,v
> retrieving revision 1.38
> diff -u -p -r1.38 rde.h
> --- rde.h     9 May 2011 12:24:41 -0000       1.38
> +++ rde.h     13 Mar 2015 08:11:15 -0000
> @@ -118,6 +118,7 @@ u_int32_t  rde_router_id(void);
>  struct area  *rde_backbone_area(void);
>  void          rde_send_change_kroute(struct rt_node *);
>  void          rde_send_delete_kroute(struct rt_node *);
> +void          rde_nbr_iface_del(struct iface *);
>  void          rde_nbr_del(struct rde_nbr *);
>  int           rde_nbr_loading(struct area *);
>  struct rde_nbr       *rde_nbr_self(struct area *);
> 

Reply via email to