]> git.puffer.fish Git - matthieu/frr.git/commitdiff
[lib] Remove numeric route-type argument in redistribute arg strings
authorPaul Jakma <paul.jakma@sun.com>
Tue, 27 Jun 2006 08:26:07 +0000 (08:26 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Tue, 27 Jun 2006 08:26:07 +0000 (08:26 +0000)
2006-06-27 Paul Jakma <paul.jakma@sun.com>

* route_types.awk: Remove setting the 'bare' numeric route type
  in redist strings.

lib/ChangeLog
lib/route_types.awk

index 37c1324bdff297373678efb0b144ff16f59d217f..89f017a1c83e71847de9f655dbbe03098089da49 100644 (file)
@@ -1,3 +1,8 @@
+2006-06-27 Paul Jakma <paul.jakma@sun.com>
+
+       * route_types.awk: Remove setting the 'bare' numeric route type
+         in redist strings.
+
 2006-06-15 Paul Jakma <paul.jakma@sun.com>
 
        * command.c: (cmd_describe_command_real) Fix leak, CID #38.
index 26d1c0ce7965b66eb52a23e25300023d6a0676a3..72f3664f21a5bacd1c11afe2bae289bcd7fa0ce7 100644 (file)
@@ -17,12 +17,11 @@ BEGIN {
        exitret = 0;
        tcount = 0;
        
-       # 'bare' redistribute specifier, <1-255>, help string.
-       redist_bare_help = "Numeric Zserv route type";
-       
        # formats for output
+       ## the define format
        redist_def_fmt = "#define QUAGGA_REDIST_STR_%s \\\n";
-       redist_str_fmt = "\"(%s<1-255>)\"\n";
+       ## DEFUN/vty route-type argument
+       redist_str_fmt = "\"(%s)\"\n";
        redist_help_def_fmt = "#define QUAGGA_REDIST_HELP_STR_%s";
        redist_help_str_fmt = " \\\n  \"%s\\n\"";
        
@@ -150,8 +149,11 @@ END {
                        
                        if ((types[type2,"4"] && types[type,"4"]) \
                            || (types[type2,"6"] && types[type,"6"])) {
-
-                               rstr = rstr types[type2,"cname"] "|";
+                               
+                               if (rstr == "")
+                                       rstr = types[type2,"cname"];
+                               else
+                                       rstr = rstr "|" types[type2,"cname"];
                                
                                if ((type2 SUBSEP "lhelp") in types)
                                  hstr2 = types[type2,"lhelp"];