Closed vladimiroltean closed 1 year ago
Hi Vladimir,
Getting this error " stack smashing detected : terminated" when I add addEthCaps TLV using lldptool. Changing the size of "struct nlattr tb" in lldp_ethtool.c, in the function "ethtool_msg_mm_get_parse" fixes it. line 184 : "struct nlattr tb[ETHTOOL_A_MM_MAX]" -> "struct nlattr *tb[ETHTOOL_A_MM_MAX+1]". I think that is inline with the ethtool mm entries, can you please incorporate in the next version?
Thanks Pranavi
Thanks for noticing, Pranavi, this is really good feedback. I'm not sure why I hadn't noticed this while running lldpad with valgrind. It probably got lost in all the journalctl output with debug logging enabled for this service. I've made this change and force-pushed to the branch for this PR, since the change was minimal.
Thanks - I'll plan to merge this by Wednesday of next week, if not sooner. Sorry it has taken so long.
Merged - thanks!
Thank you too!
The Linux kernel gained support for configuring the IEEE 802.3 MAC Merge layer via ethtool netlink: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=f3c6e128936e11e62d0af3c52f756194d79cf2e2 The intended usage for this feature is to advertise and negotiate the Frame Preemption feature with the link partner via the Additional Ethernet Capabilities (IEEE 802.3-2018 clause 79.3.7) TLV. This pull request adds support to lldpad and lldptool for this new TLV, and for talking to the kernel via the ethtool genetlink family. To that end, the lldpad program now links with libnl-genl-3.0 in addition to the libnl-3.0 it used so far.
v1: https://github.com/intel/openlldp/pull/91