]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Filters: don't rewrite gw explicitly set by filters
authorMaria Matejka <mq@ucw.cz>
Wed, 26 Feb 2025 13:45:24 +0000 (14:45 +0100)
committerMaria Matejka <mq@ucw.cz>
Wed, 26 Feb 2025 13:45:27 +0000 (14:45 +0100)
If the originating protocol sets hostentry, it should be
overridden by filters and not rewrite gw.

This fixes #156. Issue #154 may need a similar fix.

Thanks to Peter Hutchinson for reporting.

Signed-Off-By: Katerina Kubecova <katerina.kubecova@nic.cz>
filter/f-inst.c

index b8ba0a801f03097d328d5ee271c272409065ec38..00d39c39bccbd8bd2a3dacfa70da936362a27737 100644 (file)
 
       a->originated = 1;
       a->fresh = 1;
+
+      if (a->id == ea_gen_nexthop.id)
+       ea_unset_attr(&fs->rte->attrs, 1, &ea_gen_hostentry);
     }
   }