]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge branch 'master' of ssh://chivas64dev.cm.sourcefire.com/nfs/home/rucombs/Snort...
authorJosh <jrosenba@cisco.com>
Thu, 2 Oct 2014 16:36:42 +0000 (11:36 -0500)
committerJosh <jrosenba@cisco.com>
Thu, 2 Oct 2014 16:36:42 +0000 (11:36 -0500)
Conflicts:
src/managers/module_manager.cc

1  2 
src/flow/flow.cc
src/main/snort.cc
src/managers/inspector_manager.cc
src/managers/module_manager.cc
src/network_inspectors/binder/binder.cc
src/stream/tcp/tcp_session.cc

Simple merge
Simple merge
Simple merge
index 1b4e504d2145f8ff047d0baf54b55d6cfaaf4c34,9a668ffce0ca31fd170f060b204ff05e2faf91fd..75f07f95fe191a0a569a9cda2774e54b037dd425
@@@ -224,17 -239,21 +239,24 @@@ static void dump_table(string& key, con
  // set methods
  //-------------------------------------------------------------------------
  
 -static const Parameter* get_params(string& sfx, const Parameter* p)
 +static const Parameter* get_params(const string& sfx, const Parameter* p)
  {
      size_t pos = sfx.find_first_of('.');
 +    std::string new_fqn;
  
      if ( pos == string::npos )
-         new_fqn = sfx;
+     {
+         if ( p[0].name && !p[1].name )
+             return p;
+         else
 -            return nullptr;
++              new_fqn = sfx;
+     }
 +    else
++      {
 +        new_fqn = sfx.substr(pos + 1);
++      }
  
 -    sfx.erase(0, pos+1);
 -    string name = sfx.substr(0, sfx.find_first_of('.'));
 -
 +    string name = new_fqn.substr(0, new_fqn.find_first_of('.'));
      while ( p->name && name != p->name )
          ++p;
  
@@@ -364,26 -397,12 +403,29 @@@ SO_PUBLIC bool open_table(const char* s
  
      Module* m = h->mod;
  
 +    if (strcmp(m->get_name(), s))
 +    {
 +        std::string fqn = s;
 +        const Parameter* const p = get_params(fqn, m->get_parameters());
 +
 +        if ( !p )
 +        {
 +            ParseError("can't find %s\n", s);
 +            return false;
 +        }
 +        else if ((idx > 0) && (p->type == Parameter::PT_TABLE))
 +        {
 +            ParseError("%s is a table. All elements must be named\n", s);
 +            return false;
 +        }
 +    }
 +
      if ( s_current != key )
      {
-         LogMessage("\t %s\n", key.c_str());
+         if ( fqn != orig )
+             LogMessage("\t%s (%s)\n", key.c_str(), orig);
+         else
+             LogMessage("\t%s\n", key.c_str());
          s_current = key;
      }
  
Simple merge