Giter Site home page Giter Site logo

lldpad's People

Contributors

anish avatar contyk avatar dcbw avatar hreinecke avatar jahay1 avatar jrfastab avatar mdrustad avatar padkrish avatar snackewm avatar tmricht avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lldpad's Issues

lldpad crashes due to piling up of transient veth interfaces in lldpad.conf

Hi All,

On my system, lldp keeps crashing with the following error :
kernel: [1590523.105977] lldpad[17922]: segfault at c68 ip 000055f3a7de9c6a sp 00007ffc816b37c0 error 6 in lldpad[55f3a7dad000+60000]

lldpad.service: main process exited, code=killed, status=11/SEGV
Unit lldpad.service entered failed state.

Version : lldpad-1.0.1-5.1.git036e314.el7.centos.x86_64

We create lots of veth pairs and delete them at certain intervals. I see all these transient interfaces in lldpad.conf, but they are not removed.
lldpad adds all interfaces to lldpad.conf, but they are not cleaned when the interfaces are deleted. If the interfaces are virtual ethernets that are transient, the interfaces are not removed. This causes the lldpad.conf to keep growing.
lldp scan this list for changes to all the listed interfaces. This is causing the lldp to crash. Has there been a fix for this in latest releases ?

Thanks,
Srijit

segfautl on "lldptool -t -i eth2 -V PFC -c enabled :

Man page at https://linux.die.net/man/8/lldptool-pfc claims this should work.
But I get a segfault at
(gdb) bt
#0 0x000000000040a993 in get_arg_val_list (ibuf=0x7fffffffc2cd "07enabled",
ilen=14, ioff=0x7fffffffb12c, args=0x6163e0, argvals=0x6163c0)
at lldp_util.c:1239
#1 0x0000000000403c86 in print_arg_value (ibuf=0x7fffffffc2cd "07enabled")
at lldptool_cmds.c:406
#2 0x0000000000403d65 in print_tlvs (cmd=0x7fffffffb1e0,
ibuf=0x7fffffffc2cd "07enabled") at lldptool_cmds.c:436
#3 0x0000000000404225 in print_cmd_response (
ibuf=0x7fffffffc2b3 "C3010000001504eth10080c20b07enabled", status=0)
at lldptool_cmds.c:559
#4 0x000000000040432a in print_response (
buf=0x7fffffffc2b0 "R00C3010000001504eth10080c20b07enabled", status=0)
at lldptool_cmds.c:591
#5 0x0000000000401f6c in parse_print_message (
msg=0x7fffffffc2b0 "R00C3010000001504eth10080c20b07enabled", print=1)
at lldptool.c:280
#6 0x0000000000402142 in _clif_command (clif=0x616010,
cmd=0x7fffffffd3d2 "M00000001C3010000001504eth1000080c20b07enabled",
print=1) at lldptool.c:337
#7 0x0000000000402180 in clif_command (clif=0x616010,
cmd=0x7fffffffd3d2 "M00000001C3010000001504eth1000080c20b07enabled", raw=0)
at lldptool.c:346
#8 0x000000000040359d in cli_cmd_gettlv (clif=0x616010, argc=1,
argv=0x7fffffffe590, cmd=0x7fffffffd3b0, raw=0) at lldptool_cmds.c:177
#9 0x0000000000402a5a in request (clif=0x616010, argc=8, argv=0x7fffffffe558)
at lldptool.c:643
#10 0x0000000000402f5f in main (argc=8, argv=0x7fffffffe558) at lldptool.c:796

Sounds like this needs
--- a/lldp_util.c
+++ b/lldp_util.c
@@ -1207,7 +1207,7 @@ int get_arg_val_list(char *ibuf, int ilen, int *ioff,
}
hexstr2bin(ibuf+*ioff, &arglen, sizeof(arglen));
*ioff += 2 * (int)sizeof(arglen);

  •           if (ilen - *ioff >= arglen) {
    
  •           if (ilen - *ioff >= 0) {
                      args[i] = ibuf+*ioff;
                      *ioff += arglen;
                      *(arglens+i) = arglen;
    

@@ -1217,7 +1217,7 @@ int get_arg_val_list(char *ibuf, int ilen, int *ioff,
sizeof(argvalue_len));
argvalue_len = ntohs(argvalue_len);
ioff += 2sizeof(argvalue_len);

  •                           if (ilen - *ioff >= argvalue_len) {
    
  •                           if (ilen - *ioff >= 0) {
                                      argvals[i] = ibuf+*ioff;
                                      *ioff += argvalue_len;
                                      *(argvallens+i) = argvalue_len;
    

But given that the existing code has cuss-words like ibuf+*ioff
(spaces are free, you know?) one can never tell what the author was thinking.

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.