]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Nest: No automatic ROA reload on non-reloadable channels
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Mon, 8 Mar 2021 19:45:22 +0000 (20:45 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 9 Mar 2021 17:37:52 +0000 (18:37 +0100)
nest/proto.c

index 6c935426a4ae86516ad43eebb7f4f3f4cd40dfed..165125d8cbb9878ccac2012a01c75635576475ca 100644 (file)
@@ -62,6 +62,9 @@ static inline int proto_is_done(struct proto *p)
 static inline int channel_is_active(struct channel *c)
 { return (c->channel_state == CS_START) || (c->channel_state == CS_UP); }
 
+static inline int channel_reloadable(struct channel *c)
+{ return c->proto->reload_routes && c->reloadable; }
+
 static inline void
 channel_log_state_change(struct channel *c)
 {
@@ -389,6 +392,10 @@ channel_roa_subscribe_filter(struct channel *c, int dir)
   if ((f == FILTER_ACCEPT) || (f == FILTER_REJECT))
     return;
 
+  /* No automatic reload for non-reloadable channels */
+  if (dir && !channel_reloadable(c))
+    valid = 0;
+
   /* No automatic reload for BGP channels without in_table / out_table */
   if (c->channel == &channel_bgp)
     valid = dir ? !!c->in_table : !!c->out_table;
@@ -717,12 +724,6 @@ channel_request_feeding(struct channel *c)
   channel_log_state_change(c);
 }
 
-static inline int
-channel_reloadable(struct channel *c)
-{
-  return c->proto->reload_routes && c->reloadable;
-}
-
 static void
 channel_request_reload(struct channel *c)
 {