]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge commit '71b434a9' into HEAD
authorMaria Matejka <mq@ucw.cz>
Tue, 4 Oct 2022 13:53:12 +0000 (15:53 +0200)
committerMaria Matejka <mq@ucw.cz>
Tue, 4 Oct 2022 13:53:12 +0000 (15:53 +0200)
1  2 
nest/protocol.h
sysdep/unix/krt.c

diff --cc nest/protocol.h
index 3c823ae11d860aa3fb374ce7d582ee6e3d24fdf9,709d64157d7f8bf915dcf51aeaf68f46f0b60cbb..b473012620498ccb379d0cbb7dac7b9a9c5421ed
@@@ -182,15 -182,15 +182,12 @@@ struct proto 
     *  Routing entry hooks (called only for routes belonging to this protocol):
     *
     *     rte_recalculate Called at the beginning of the best route selection
--   *     rte_better   Compare two rte's and decide which one is better (1=first, 0=second).
--   *       rte_same   Compare two rte's and decide whether they are identical (1=yes, 0=no).
     *       rte_mergable       Compare two rte's and decide whether they could be merged (1=yes, 0=no).
     *     rte_insert   Called whenever a rte is inserted to a routing table.
     *     rte_remove   Called whenever a rte is removed from the routing table.
     */
  
    int (*rte_recalculate)(struct rtable *, struct network *, struct rte *, struct rte *, struct rte *);
--  int (*rte_better)(struct rte *, struct rte *);
    int (*rte_mergable)(struct rte *, struct rte *);
    void (*rte_insert)(struct network *, struct rte *);
    void (*rte_remove)(struct network *, struct rte *);
index dd2c63c4f44d891845aa82b29f09da214591c73c,f796a15936fca444e58b4835a8bf24deab8f20db..471efebaf1c859f5d173179a1c764b80e59ef5e5
@@@ -811,6 -804,6 +812,10 @@@ krt_postconfig(struct proto_config *CF
    krt_sys_postconfig(cf);
  }
  
++struct rte_owner_class krt_rte_owner_class = {
++  .rte_better = krt_rte_better,
++};
++
  static struct proto *
  krt_init(struct proto_config *CF)
  {
    p->p.if_notify = krt_if_notify;
    p->p.reload_routes = krt_reload_routes;
    p->p.feed_end = krt_feed_end;
-   p->p.rte_better = krt_rte_better;
++  p->p.sources.class = &krt_rte_owner_class;
 +
    krt_sys_init(p);
    return &p->p;
  }