]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Check table type at `show route for ...'
authorPavel Tvrdik <pawel.tvrdik@gmail.com>
Wed, 29 Jun 2016 07:56:33 +0000 (09:56 +0200)
committerJan Moskyto Matejka <mq@ucw.cz>
Wed, 7 Dec 2016 08:35:24 +0000 (09:35 +0100)
nest/rt-table.c

index 8d780633b88a46b78f0e8f7017e5eb4bf9ad5e3d..cb45898f125e7f90f01ba01aa2cf8a4138ecdc9d 100644 (file)
@@ -2683,6 +2683,12 @@ rt_show(struct rt_show_data *d)
            }
        }
 
+      if (d->table->addr_type != d->addr->type)
+      {
+       cli_msg(8001, "Incompatible type of prefix/ip with table");
+       return;
+      }
+
       if (d->show_for)
        n = net_route(d->table, d->addr);
       else