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

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


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

But when I restart zebra (after saveing the config) it does not work 
This lines gets saved:
ip route 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));
             case STATIC_IPV4_IFNAME:
               vty_out (vty, " %s", si->gate.ifname);
             case STATIC_IPV4_BLACKHOLE:
               vty_out (vty, " Null0");

         /* 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?


More information about the Quagga-dev mailing list