[quagga-dev 4600] Problem with reject route / bug 325

Ingo Flaschberger if at xip.at
Mon Mar 5 01:07:59 GMT 2007


Hi,

When I add a reject route in zebra:
ip route 192.168.0.0/16 reject
everything is fine and freebsd send icmp unreachables.

But when I restart zebra (after saveing the config) it does not work 
anymore.
This lines gets saved:
ip route 192.168.0.0/16 Null0


I have traced back the problem to line zebra/zebra_vty.c:
Line 1023
         switch (si->type)
           {
             case STATIC_IPV4_GATEWAY:
               vty_out (vty, " %s", inet_ntoa (si->gate.ipv4));
               break;
             case STATIC_IPV4_IFNAME:
               vty_out (vty, " %s", si->gate.ifname);
               break;
             case STATIC_IPV4_BLACKHOLE:
               vty_out (vty, " Null0");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Here!
               break;
           }

         /* flags are incompatible with STATIC_IPV4_BLACKHOLE */
         if (si->type != STATIC_IPV4_BLACKHOLE)
           {
             if (CHECK_FLAG(si->flags, ZEBRA_FLAG_REJECT))
               vty_out (vty, " %s", "reject");

             if (CHECK_FLAG(si->flags, ZEBRA_FLAG_BLACKHOLE))
               vty_out (vty, " %s", "blackhole");
           }
-----

And the cvs comment from Revision 1.5:
 	zebra/zebra_vty.c: Pass ZEBRA_FLAG_BLACKHOLE flag to
           static_add_ipv4() if Null0 route is configured. print out Null0 if
           STATIC_IPV4_BLACKHOLE route, and ignore flags (shouldnt be
           possible to set flags from vty) for config and show route.

So.. why should it not be possible to add reject routes?
Why it is allowd at the vty and changed to Null0?

bye,
 	ingo



More information about the Quagga-dev mailing list