]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Cleaning up also the rte_same hook which is never set
authorMaria Matejka <mq@ucw.cz>
Mon, 17 Feb 2020 11:55:11 +0000 (12:55 +0100)
committerMaria Matejka <mq@ucw.cz>
Thu, 30 Apr 2020 14:14:26 +0000 (16:14 +0200)
nest/proto-hooks.c
nest/protocol.h
nest/rt-table.c

index 716ce86c80ef0b1d8b4d0814dee0de6b72a5138c..9b000c17316045543d6fb936d7970bcbb31f4e2f 100644 (file)
@@ -274,21 +274,6 @@ int rte_recalculate(struct rtable *table, struct network *net, struct rte *new,
 int rte_better(rte *new, rte *old)
 { DUMMY; }
 
-/**
- * rte_same - compare two routes
- * @e1: route
- * @e2: route
- *
- * The rte_same() hook tests whether the routes @e1 and @e2 belonging
- * to the same protocol instance have identical contents. Contents of
- * &rta, all the extended attributes and &rte preference are checked
- * by the core code, no need to take care of them here.
- *
- * Result: 1 if @e1 is identical to @e2, 0 otherwise.
- */
-int rte_same(rte *e1, rte *e2)
-{ DUMMY; }
-
 /**
  * rte_insert - notify instance about route insertion
  * @n: network
index 21e0f192775a865550f6be515f034ebba778fd05..7806b9c0ebe5d17b0f6cd797144c4a70a75d5f18 100644 (file)
@@ -222,7 +222,6 @@ struct proto {
    *
    *      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.
@@ -230,7 +229,6 @@ struct proto {
 
   int (*rte_recalculate)(struct rtable *, struct network *, struct rte *, struct rte *, struct rte *);
   int (*rte_better)(struct rte *, struct rte *);
-  int (*rte_same)(struct rte *, struct rte *);
   int (*rte_mergable)(struct rte *, struct rte *);
   struct rte * (*rte_modify)(struct rte *, struct linpool *);
   void (*rte_insert)(struct network *, struct rte *);
index 2e5320d58884ec43ba708e5ce901d210c641465d..b527a6b73374f6353649bb28c475e9125f16488b 100644 (file)
@@ -892,8 +892,6 @@ rte_same(rte *x, rte *y)
   /* rte.flags are not checked, as they are mostly internal to rtable */
   return
     x->attrs == y->attrs &&
-    x->pflags == y->pflags &&
-    (!x->attrs->src->proto->rte_same || x->attrs->src->proto->rte_same(x, y)) &&
     rte_is_filtered(x) == rte_is_filtered(y);
 }