]> git.puffer.fish Git - matthieu/frr.git/commitdiff
Merge remote-tracking branch 'osr/master' into vtysh-grammar
authorQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 6 Dec 2016 19:51:33 +0000 (19:51 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 6 Dec 2016 19:51:33 +0000 (19:51 +0000)
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Conflicts:
lib/command_match.c

1  2 
bgpd/bgp_nexthop.c
bgpd/bgp_route.c
bgpd/bgp_updgrp_adv.c
bgpd/bgp_vty.c
lib/command_match.c
ospf6d/ospf6_top.c
ospfd/ospf_vty.c
ripngd/ripngd.c
zebra/rtadv.c
zebra/zebra_routemap.c
zebra/zebra_vty.c

Simple merge
Simple merge
Simple merge
diff --cc bgpd/bgp_vty.c
Simple merge
index 13c890fc038a42250fddc2f3f2d5de240c8db544,d4996f634d0cf2f1e2f2a219fecd3b80e0f01268..14501c8626149d62b10ef6398efdab1603989571
  #include "command_match.h"
  #include "memory.h"
  
 -DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command Tokens")
 +#ifdef TRACE_MATCHER
 +#define TM 1
 +#else
 +#define TM 0
 +#endif
 +
 +#define trace_matcher(...) \
 +   do { if (TM) fprintf (stderr, __VA_ARGS__); } while (0);
  
- DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command Tokens")
  /* matcher helper prototypes */
  static int
  add_nexthops (struct list *, struct graph_node *);
@@@ -125,12 -115,12 +122,28 @@@ command_match (struct graph *cmdgraph
        assert (*el);
      }
  
++<<<<<<< HEAD
 +  if (!*el) {
 +    trace_matcher ("No match\n");
 +  }
 +  else {
 +    trace_matcher ("Matched command\n->string %s\n->desc %s\n", (*el)->string, (*el)->doc);
 +  }
++||||||| merged common ancestors
++  if (!*el) {
++    trace_matcher ("No match");
++  }
++  else {
++    trace_matcher ("Matched command\n->string %s\n->desc %s\n", (*el)->string, (*el)->doc);
++  }
++=======
+ #ifdef TRACE_MATCHER
+   if (!*el)
+     fprintf (stdout, "No match\n");
+   else
+     fprintf (stdout, "Matched command\n->string %s\n->desc %s\n", (*el)->string, (*el)->doc);
+ #endif
++>>>>>>> osr/master
  
    // free the leader token we alloc'd
    XFREE (MTYPE_TMP, vector_slot (vvline, 0));
@@@ -359,32 -344,37 +374,90 @@@ command_complete (struct graph *graph
              continue;
  
            enum match_type minmatch = min_match_level (token->type);
++<<<<<<< HEAD
 +          trace_matcher ("\"%s\" matches \"%s\" (%d) ? ",
 +                         input_token, token->text, token->type);
++||||||| merged common ancestors
++          trace_matcher ("\"%s\" matches \"%s\" (%d) ? ", input_token, token->text, token->type);
++=======
+ #ifdef TRACE_MATCHER
+           fprintf (stdout, "\"%s\" matches \"%s\" (%d) ? ", input_token, token->text, token->type);
+ #endif
++>>>>>>> osr/master
  
 -          switch (match_token (token, input_token))
 +          unsigned int last_token = (vector_active (vline) - 1 == idx);
 +          enum match_type matchtype = match_token (token, input_token);
 +          switch (matchtype)
              {
 +              // occurs when last token is whitespace
                case trivial_match:
++<<<<<<< HEAD
 +                trace_matcher ("trivial_match\n");
 +                assert(last_token);
 +                listnode_add (next, gn);
 +                break;
++||||||| merged common ancestors
++                trace_matcher ("trivial_match\n");
++                assert(idx == vector_active (vline) - 1);
++                listnode_add (next, gn);
++                break;
++=======
+ #ifdef TRACE_MATCHER
+                 fprintf (stdout, "trivial_match\n");
+ #endif
++>>>>>>> osr/master
                case partly_match:
++<<<<<<< HEAD
 +                trace_matcher ("trivial_match\n");
 +                if (exact_match_exists && !last_token)
 +                  break;
++||||||| merged common ancestors
++                trace_matcher ("partly_match\n");
++                // last token on line is partial and
++                // not a space
++                if (idx == vector_active (vline) - 1)
++                  {
++                    listnode_add (next, gn);
++                    break;
++                  }
++                if (minmatch <= partly_match)
++                  add_nexthops (next, gn);
++
++                break;
++=======
+ #ifdef TRACE_MATCHER
+                 fprintf (stdout, "partly_match\n");
+ #endif
+                 if (idx == vector_active (vline) - 1)
+                   {
+                     listnode_add (next, gn);
+                     break;
+                   }
+                 if (minmatch > partly_match)
+                   break;
++>>>>>>> osr/master
                case exact_match:
++<<<<<<< HEAD
 +                trace_matcher ("exact_match\n");
 +                if (last_token)
 +                  listnode_add (next, gn);
 +                else if (matchtype >= minmatch)
 +                  add_nexthops (next, gn);
++||||||| merged common ancestors
++                trace_matcher ("exact_match\n");
++                add_nexthops (next, gn);
++                listnode_add (next, gn);
++=======
+ #ifdef TRACE_MATCHER
+                 fprintf (stdout, "exact_match\n");
+ #endif
+                 add_nexthops (next, gn);
++>>>>>>> osr/master
                  break;
                default:
-                 trace_matcher ("no_match\n");
+ #ifdef TRACE_MATCHER
+                 fprintf (stdout, "no_match\n");
+ #endif
                  break;
              }
          }
Simple merge
Simple merge
diff --cc ripngd/ripngd.c
index 70e6a29cfaa4b84c0309b618b7130fa8b769dd79,fefb1fd2669de555c9e260f29764d1873b8f631f..efd21b806783bbcbe7be9190c300cc58318efcbf
@@@ -3027,8 -3092,9 +3092,10 @@@ ripng_init (
    /* Install ripng commands. */
    install_element (VIEW_NODE, &show_ipv6_ripng_cmd);
    install_element (VIEW_NODE, &show_ipv6_ripng_status_cmd);
 +  install_element (VIEW_NODE, &show_ipv6_protocols_cmd);
  
+   install_element (ENABLE_NODE, &clear_ipv6_rip_cmd);
    install_element (CONFIG_NODE, &router_ripng_cmd);
    install_element (CONFIG_NODE, &no_router_ripng_cmd);
  
diff --cc zebra/rtadv.c
Simple merge
Simple merge
Simple merge