Giter VIP home page Giter VIP logo

mink-core's People

Contributors

codacy-badger avatar dfranusic avatar ratkaj avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

mink-core's Issues

Remove dl methods from mink_utils

Some binaries are not using dlopen and related methods but are still linked with with libdl. Convenience methods for dynamic loading of plugins are included in mink_utils; they should be migrated to a separate namespace.

Monitor network interfaces for changes in state (up/down)

Describe the bug
Listener stops responding when interfaces go down while the process is already running

To Reproduce
Steps to reproduce the behaviour:

  1. start routing
  2. disable the network interface
  3. try connecting

Expected behaviour
Undefined

Import gRPC daemon

Describe the bug
Import gRPC daemon, scan with Sonarcloud and perform code cleanup

To Reproduce
Steps to reproduce the behaviour:
n/a

Expected behaviour
Code cleanup of grpc daemon

OS (please complete the following information):

  • Kernel version: 5.13.9-arch1-1
  • Linux distribution information: Arch

Additional context
n/a

GDB output
n/a

Yocto build failing

Building the framework with Yocto/OpenEmbededd (Poky reference, version honister) following issue occurs for x86_64

../git/src/cfg/mink_config.cpp:851:24: error: format not a string literal and no format arguments [-Werror=format-security]
  851 |                 wprintw(win, tmp_cmd.c_str());
      |                 ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

../git/src/cfg/mink_config.cpp: In member function 'void config::Config::show_commands(config::ConfigItem*, int, bool)':
../git/src/cfg/mink_config.cpp:919:35: error: format not a string literal and no format arguments [-Werror=format-security]
  919 |                 if(ncurses) printw(tmp_cmd.c_str()); else std::cout << tmp_cmd;
      |                             ~~~~~~^~~~~~~~~~~~~~~~~

../git/src/cfg/mink_config.cpp: In member function 'void config::Config::print_cfg_def(bool, bool, config::ConfigItem*, int, int, WINDOW*)':
../git/src/cfg/mink_config.cpp:1980:28: warning: field width specifier '*' expects argument of type 'int', but argument 3 has type 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wformat=]
 1980 |             wprintw(win, "%*s", max_length - def->children[i]->name.size(), tmp_prefix.c_str());
      |                           ~^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                            |               |
      |                            int             std::__cxx11::basic_string<char>::size_type {aka long unsigned int}

../git/src/cfg/mink_config.cpp:2012:24: error: format not a string literal and no format arguments [-Werror=format-security]
 2012 |                 wprintw(win, def->children[i]->desc.c_str());
      |                 ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../git/src/cfg/mink_config.cpp: In member function 'void config::Config::print_cfg_def(bool, bool, config::ConfigItem*, int, int)':
../git/src/cfg/mink_config.cpp:2083:23: error: format not a string literal and no format arguments [-Werror=format-security]
 2083 |                 printw(tmp_val->c_str());
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~

../git/src/cfg/mink_config.cpp:2091:23: error: format not a string literal and no format arguments [-Werror=format-security]
 2091 |                 printw(def->children[i]->desc.c_str());
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

x86_64-poky-linux-g++  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/linux/poky/build/tmp/work/core2-64-poky-linux/link-mink/1.0-r0/recipe-sysroot -std=c++11 -DHAVE_CONFIG_H   -Isrc/include -Ilib/libantlr3c-3.4/include -Ilib/libantlr3c-3.4 -Isrc/services/config   -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/opt/linux/poky/build/tmp/work/core2-64-poky-linux/link-mink/1.0-r0=/usr/src/debug/link-mink/1.0-r0                      -fdebug-prefix-map=/opt/linux/poky/build/tmp/work/core2-64-poky-linux/link-mink/1.0-r0=/usr/src/debug/link-mink/1.0-r0                      -fdebug-prefix-map=/opt/linux/poky/build/tmp/work/core2-64-poky-linux/link-mink/1.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/opt/linux/poky/build/tmp/work/core2-64-poky-linux/link-mink/1.0-r0/recipe-sysroot-native=  -fvisibility-inlines-hidden  -O -c -o src/services/config/configd-events.o `test -f 'src/services/config/events.cpp' || echo '../git/'`src/services/config/events.cpp

../git/src/services/config/events.cpp:12:10: fatal error: events.h: No such file or directory
   12 | #include <events.h>
      |          ^~~~~~~~~~

compilation terminated.

Also:

../git/src/cfg/plgcfg.cpp: In member function 'virtual void HbeatMissed::run(gdt::GDTCallbackArgs*)':
../git/src/cfg/plgcfg.cpp:57:15: error: format not a string literal and no format arguments [-Werror=format-security]
   57 |         printw(cli::CLIService::CURRENT_CLI_SERVICE->get_prompt()->c_str());
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../git/src/cfg/plgcfg.cpp: In function 'void* block_handler(void**, int)':
../git/src/cfg/plgcfg.cpp:184:15: error: format not a string literal and no format arguments [-Werror=format-security]
  184 |         printw(cli->get_prompt()->c_str());
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~

../git/src/cfg/plgcfg.cpp:185:15: error: format not a string literal and no format arguments [-Werror=format-security]
  185 |         printw(cli->get_current_line()->c_str());
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../git/src/cfg/plgcfg.cpp:195:15: error: format not a string literal and no format arguments [-Werror=format-security]
  195 |         printw(cli->get_prompt()->c_str());
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~

../git/src/cfg/plgcfg.cpp:330:15: error: format not a string literal and no format arguments [-Werror=format-security]
  330 |         printw(cli->get_prompt()->c_str());
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~

../git/src/cfg/plgcfg.cpp:331:15: error: format not a string literal and no format arguments [-Werror=format-security]
  331 |         printw(cli->get_current_line()->c_str());
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../git/src/cfg/plgcfg.cpp:633:15: error: format not a string literal and no format arguments [-Werror=format-security]
  633 |         printw(cli->get_prompt()->c_str());
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~

../git/src/cfg/plgcfg.cpp: In function 'void* block_handler_init(void**, int)':
../git/src/cfg/plgcfg.cpp:706:62: warning: unknown conversion type character '!' in format [-Wformat=]
  706 |                     printw("Invalid daemon address format '%'!\n", optarg);
      |                                                              ^

../git/src/cfg/plgcfg.cpp:706:28: warning: too many arguments for format [-Wformat-extra-args]
  706 |                     printw("Invalid daemon address format '%'!\n", optarg);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.