Diff for /embedaddon/bird/proto/bfd/bfd.c between versions 1.1 and 1.1.1.2

version 1.1, 2017/08/22 12:33:54 version 1.1.1.2, 2021/03/17 19:50:23
Line 624  bfd_request_notify(struct bfd_request *req, u8 state,  Line 624  bfd_request_notify(struct bfd_request *req, u8 state, 
 static int  static int
 bfd_add_request(struct bfd_proto *p, struct bfd_request *req)  bfd_add_request(struct bfd_proto *p, struct bfd_request *req)
 {  {
     if (p->p.vrf_set && (p->p.vrf != req->vrf))
       return 0;
   
   struct bfd_session *s = bfd_find_session_by_addr(p, req->addr);    struct bfd_session *s = bfd_find_session_by_addr(p, req->addr);
   u8 state, diag;    u8 state, diag;
   
Line 685  bfd_drop_requests(struct bfd_proto *p) Line 688  bfd_drop_requests(struct bfd_proto *p)
 static struct resclass bfd_request_class;  static struct resclass bfd_request_class;
   
 struct bfd_request *  struct bfd_request *
bfd_request_session(pool *p, ip_addr addr, ip_addr local, struct iface *iface,bfd_request_session(pool *p, ip_addr addr, ip_addr local,
                     struct iface *iface, struct iface *vrf,
                     void (*hook)(struct bfd_request *), void *data)                      void (*hook)(struct bfd_request *), void *data)
 {  {
   struct bfd_request *req = ralloc(p, &bfd_request_class);    struct bfd_request *req = ralloc(p, &bfd_request_class);
Line 696  bfd_request_session(pool *p, ip_addr addr, ip_addr loc Line 700  bfd_request_session(pool *p, ip_addr addr, ip_addr loc
   req->addr = addr;    req->addr = addr;
   req->local = local;    req->local = local;
   req->iface = iface;    req->iface = iface;
     req->vrf = vrf;
   
   bfd_submit_request(req);    bfd_submit_request(req);
   
Line 754  bfd_neigh_notify(struct neighbor *nb) Line 759  bfd_neigh_notify(struct neighbor *nb)
   if ((nb->scope > 0) && !n->req)    if ((nb->scope > 0) && !n->req)
   {    {
     ip_addr local = ipa_nonzero(n->local) ? n->local : nb->ifa->ip;      ip_addr local = ipa_nonzero(n->local) ? n->local : nb->ifa->ip;
    n->req = bfd_request_session(p->p.pool, n->addr, local, nb->iface, NULL, NULL);    n->req = bfd_request_session(p->p.pool, n->addr, local, nb->iface, p->p.vrf, NULL, NULL);
   }    }
   
   if ((nb->scope <= 0) && n->req)    if ((nb->scope <= 0) && n->req)
Line 771  bfd_start_neighbor(struct bfd_proto *p, struct bfd_nei Line 776  bfd_start_neighbor(struct bfd_proto *p, struct bfd_nei
   
   if (n->multihop)    if (n->multihop)
   {    {
    n->req = bfd_request_session(p->p.pool, n->addr, n->local, NULL, NULL, NULL);    n->req = bfd_request_session(p->p.pool, n->addr, n->local, NULL, p->p.vrf, NULL, NULL);
     return;      return;
   }    }
   
Line 1052  bfd_reconfigure(struct proto *P, struct proto_config * Line 1057  bfd_reconfigure(struct proto *P, struct proto_config *
   return 1;    return 1;
 }  }
   
 /* Ensure one instance */  
 struct bfd_config *bfd_cf;  
   
 static void  static void
 bfd_preconfig(struct protocol *P UNUSED, struct config *c UNUSED)  
 {  
   bfd_cf = NULL;  
 }  
   
 static void  
 bfd_copy_config(struct proto_config *dest, struct proto_config *src UNUSED)  bfd_copy_config(struct proto_config *dest, struct proto_config *src UNUSED)
 {  {
   struct bfd_config *d = (struct bfd_config *) dest;    struct bfd_config *d = (struct bfd_config *) dest;
Line 1123  struct protocol proto_bfd = { Line 1119  struct protocol proto_bfd = {
   .start =              bfd_start,    .start =              bfd_start,
   .shutdown =           bfd_shutdown,    .shutdown =           bfd_shutdown,
   .reconfigure =        bfd_reconfigure,    .reconfigure =        bfd_reconfigure,
   .preconfig =          bfd_preconfig,  
   .copy_config =        bfd_copy_config,    .copy_config =        bfd_copy_config,
 };  };

Removed from v.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>