]> git.ipfire.org Git - thirdparty/lldpd.git/log
thirdparty/lldpd.git
18 months agobuild: update two additional docker actions
Vincent Bernat [Sat, 12 Nov 2022 07:41:44 +0000 (08:41 +0100)] 
build: update two additional docker actions

18 months agobuild: fix release script to work with OOT build dir
Vincent Bernat [Fri, 11 Nov 2022 16:48:04 +0000 (17:48 +0100)] 
build: fix release script to work with OOT build dir

18 months agoosx: update Homebrew recipe
Vincent Bernat [Fri, 11 Nov 2022 16:43:53 +0000 (17:43 +0100)] 
osx: update Homebrew recipe

18 months agobuild: bump docker/build-push-action from 2 to 3
dependabot[bot] [Fri, 11 Nov 2022 14:24:11 +0000 (14:24 +0000)] 
build: bump docker/build-push-action from 2 to 3

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 3.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
18 months agobuild: bump docker/login-action from 1 to 2
dependabot[bot] [Fri, 11 Nov 2022 14:24:16 +0000 (14:24 +0000)] 
build: bump docker/login-action from 1 to 2

Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
18 months agobuild: bump docker/metadata-action from 3 to 4
dependabot[bot] [Fri, 11 Nov 2022 14:24:18 +0000 (14:24 +0000)] 
build: bump docker/metadata-action from 3 to 4

Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3 to 4.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](https://github.com/docker/metadata-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
18 months agobuild: bump cachix/install-nix-action from 17 to 18
dependabot[bot] [Fri, 11 Nov 2022 14:24:25 +0000 (14:24 +0000)] 
build: bump cachix/install-nix-action from 17 to 18

Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 17 to 18.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v17...v18)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
18 months agobuild: bump actions/download-artifact from 2 to 3
dependabot[bot] [Fri, 11 Nov 2022 14:24:27 +0000 (14:24 +0000)] 
build: bump actions/download-artifact from 2 to 3

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
18 months agobuild: add dependabot
Vincent Bernat [Fri, 11 Nov 2022 14:18:07 +0000 (15:18 +0100)] 
build: add dependabot

18 months agobuild: update some actions to remove warnings
Vincent Bernat [Fri, 11 Nov 2022 14:17:21 +0000 (15:17 +0100)] 
build: update some actions to remove warnings

18 months agobuild: update set-output method for GitHub action
Vincent Bernat [Fri, 11 Nov 2022 14:13:23 +0000 (15:13 +0100)] 
build: update set-output method for GitHub action

18 months agorelease: 1.0.16 1.0.16
Vincent Bernat [Fri, 11 Nov 2022 13:25:30 +0000 (14:25 +0100)] 
release: 1.0.16

18 months agobuild: add .git-blame-ignore-revs file
Vincent Bernat [Sun, 6 Nov 2022 11:42:31 +0000 (12:42 +0100)] 
build: add .git-blame-ignore-revs file

18 months agobuild: reformat code
Vincent Bernat [Sun, 6 Nov 2022 11:39:50 +0000 (12:39 +0100)] 
build: reformat code

18 months agoci: enforce a format style with clang-format and black
Vincent Bernat [Sun, 6 Nov 2022 08:52:00 +0000 (09:52 +0100)] 
ci: enforce a format style with clang-format and black

On PR, we could use git-clang-format instead.

18 months agoci: add an Emacs script to format C files
Vincent Bernat [Sat, 5 Nov 2022 23:40:51 +0000 (00:40 +0100)] 
ci: add an Emacs script to format C files

    git ls-files '*.c' '*.h' \
        | grep -v '^include/' \
        | xargs emacs -Q --batch -l tests/ci/openbsd-knf-style.el

18 months agobuild: move again stuff using libfuzzer
Vincent Bernat [Sat, 5 Nov 2022 19:18:27 +0000 (20:18 +0100)] 
build: move again stuff using libfuzzer

And fix documentation.

18 months agobuild: fix fuzz-decode automake
Vincent Bernat [Fri, 4 Nov 2022 20:26:49 +0000 (21:26 +0100)] 
build: fix fuzz-decode automake

18 months agooss-fuzz and fuzzer files #551
0x34d [Sun, 9 Oct 2022 11:37:02 +0000 (17:07 +0530)] 
oss-fuzz and fuzzer files #551

Signed-off-by: 0x34d <ajsinghyadav00@gmail.com>
18 months agoci: update cross-platform-actions to 0.6.2
Vincent Bernat [Thu, 27 Oct 2022 21:40:01 +0000 (23:40 +0200)] 
ci: update cross-platform-actions to 0.6.2

To get OpenBSD 7.1.

18 months agoci: do not try to compile SNMP on MacOS
Vincent Bernat [Thu, 27 Oct 2022 21:36:50 +0000 (23:36 +0200)] 
ci: do not try to compile SNMP on MacOS

Broken, I don't think anybody is really using it. For some reason, the
Homebrew version does not take over.

18 months agoci: test with OpenBSD 7.1
Vincent Bernat [Thu, 27 Oct 2022 21:11:30 +0000 (23:11 +0200)] 
ci: test with OpenBSD 7.1

Latest is 7.2, but it's good to build with the version before. 6.9 not
available anymore.

18 months agoci: try to install NetSNMP from Homebrew
Vincent Bernat [Thu, 27 Oct 2022 21:22:53 +0000 (23:22 +0200)] 
ci: try to install NetSNMP from Homebrew

The one shipped with MacOS is broken.

```
checking whether C compiler supports flag "-DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -Os -pipe -DBUILD=174 -DMACOSX_DEPLOYMENT_TARGET=12.6 --sysroot /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -iframeworkwithsysroot /System/Library/Frameworks/-1788-11ed-b9c4-96898e02b808/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.6.Internal.sdk/System/Library/PrivateFrameworks/ -1788-11ed-b9c4-96898e02b808/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.6.Internal.sdk/System/Library/Frameworks/ -iwithsysroot /usr/local/libressl/include -L/AppleInternal/Library/BuildRoots/a0876c02-1788-11ed-b9c4-96898e02b808/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.6.Internal.sdk/usr/local/libressl/lib -Udarwin21 -Ddarwin21=darwin21 -I/usr/local/include -DNETSNMP_NO_INLINE -lnetsnmpmibs -lnetsnmpagent -lnetsnmp"
```

18 months agodaemon: name the ints returned by pattern_match() function
Vincent Bernat [Thu, 27 Oct 2022 21:02:34 +0000 (23:02 +0200)] 
daemon: name the ints returned by pattern_match() function

18 months agodaemon: cleanup remote ports for permanent interfaces too
Vincent Bernat [Thu, 27 Oct 2022 20:55:25 +0000 (22:55 +0200)] 
daemon: cleanup remote ports for permanent interfaces too

Otherwise, we will try to delete them again and again.

Fix #554

19 months agolib: fix types in custom TLVs documentation
Vincent Bernat [Sat, 8 Oct 2022 11:41:38 +0000 (13:41 +0200)] 
lib: fix types in custom TLVs documentation

Fix #550

19 months agoclient: document ability to have per-port custom TLVs
Vincent Bernat [Thu, 22 Sep 2022 21:14:37 +0000 (23:14 +0200)] 
client: document ability to have per-port custom TLVs

19 months agolib: zero receive buffer
Vincent Bernat [Sun, 18 Sep 2022 08:03:43 +0000 (10:03 +0200)] 
lib: zero receive buffer

This is not strictly needed as we only use the part that was correctly
written by recv(), but it helps static tool analysis.

19 months agobuild: really reset coverity cache
Vincent Bernat [Sun, 18 Sep 2022 07:25:14 +0000 (09:25 +0200)] 
build: really reset coverity cache

19 months agobuild: reset Coverity cache
Vincent Bernat [Sun, 18 Sep 2022 07:23:58 +0000 (09:23 +0200)] 
build: reset Coverity cache

20 months agodaemon: do not use 00:00:00:00:00:00 as chassis ID
Vincent Bernat [Thu, 18 Aug 2022 21:56:47 +0000 (23:56 +0200)] 
daemon: do not use 00:00:00:00:00:00 as chassis ID

Fix #541

21 months agoclient: mention pause does not work in the configuration file
Vincent Bernat [Wed, 17 Aug 2022 18:18:41 +0000 (20:18 +0200)] 
client: mention pause does not work in the configuration file

Fix #538

21 months agobuild: only build ARM64 docker images for releases
Vincent Bernat [Wed, 17 Aug 2022 15:36:42 +0000 (17:36 +0200)] 
build: only build ARM64 docker images for releases

21 months agobuild: disable multi-arch build for now
Vincent Bernat [Wed, 17 Aug 2022 14:50:25 +0000 (16:50 +0200)] 
build: disable multi-arch build for now

We keep this as this would become handy in the future and people can
still try to use it.

21 months agobuild: ship universal binaries for macOS
Vincent Bernat [Wed, 17 Aug 2022 14:09:02 +0000 (16:09 +0200)] 
build: ship universal binaries for macOS

This mostly reverts commit 737afb3517d822ae50722510993acbd097bc5aca.
We have to build in an OOT directory to make it work. This also
requires to bump minimum SDK to 11.1 (for ARM64 mostly but it also fix
an issue with strtonum() which is detected as available but really is
since 11.0 only).

This does not currently work as the host has to be ARM64 (to be able
to run both binaries). Otherwise, we would have to cross-compile. See
https://github.com/actions/runner-images/issues/2187 for availability.

21 months agobuild: try to run FreeBSD/OpenBSD on macos-latest
Vincent Bernat [Wed, 17 Aug 2022 14:12:13 +0000 (16:12 +0200)] 
build: try to run FreeBSD/OpenBSD on macos-latest

macos-10.15 environment is being deprecated.

21 months agobuild: prefer install in /usr/local in Docker
Vincent Bernat [Wed, 17 Aug 2022 13:47:45 +0000 (15:47 +0200)] 
build: prefer install in /usr/local in Docker

It does not matter much, but this is more correct from a distribution
point of view.

21 months agorelease: 1.0.15 1.0.15
Vincent Bernat [Wed, 17 Aug 2022 13:07:26 +0000 (15:07 +0200)] 
release: 1.0.15

21 months agoprotocol/lldp: accept unknown TLVs on known orgs
Vincent Bernat [Tue, 16 Aug 2022 16:31:06 +0000 (18:31 +0200)] 
protocol/lldp: accept unknown TLVs on known orgs

Fix #532

21 months agoclient: make a connection before parsing inputs
Vincent Bernat [Thu, 11 Aug 2022 16:24:39 +0000 (18:24 +0200)] 
client: make a connection before parsing inputs

This shows a clear error message if the socket does not exist and when
using privileged commands.

Fix #535.

21 months agodoc: mention contributor of last commit
Vincent Bernat [Thu, 11 Aug 2022 10:34:32 +0000 (12:34 +0200)] 
doc: mention contributor of last commit

21 months agoclient: Added support to override system capabilities
Ignacio Sanchez Navarro [Mon, 1 Aug 2022 17:22:40 +0000 (13:22 -0400)] 
client: Added support to override system capabilities

1) configure system capabilities enabled <capability_0,capability_1,...>

    Override system capabilities with the provided value instead of using kernel information. Several capabilities can be specified separated by commas. Only available capabilities can be enabled. Valid capabilities are:

        other
        repeater
        bridge
        wlan
        router
        telephone
        docsis
        station

    Here is an example of use:

        lldpcli configure system capabilities enabled bridge,router

2) unconfigure system capabilities enabled

    Do not override capabilities and use the kernel information. This option undoes the previous one.

Ignacio Sanchez Navarro (Ignacio.Sanchez@uws.ac.uk) - University of the West of Scotland - Supported by H2020-ICT-2020-2/101017226 6G-BRAINS

-------------------------------------------------------------------------------
Modified files

lldpd-structs.h
    - Added new attribute "c_cap_override" to "lldpd_config" struct

conf-system.c
    - Added new function "cmd_capability" for new command to override the chassis capabilities
    - Added new function "register_commands_capabilities" to registers new commands to override the chassis capabilities
    - Added call to "register_commands_capabilities" in "register_commands_configure_system"

chassis.c
    - Added new function "_lldpctl_atom_st_int_chassis" to set "int" type vars in chassis
    - Added assignation of ".set_int" function in "chassis" var build

config.c
    - Added case for "lldpctl_k_config_chassis_cap_override" to get value of "c_cap_override" in "_lldpctl_atom_get_int_config" function
    - Added case for "lldpctl_k_config_chassis_cap_override" to set value of "c_cap_override" in "_lldpctl_atom_set_int_config" function

client.c
    - Added changes check for "c_cap_override" var in "client_handle_set_configuration" function
    - Added changes check for "c_cap_enabled" var in "client_handle_set_local_chassis" function

lldpctl.h
    - Added new enum values un "lldpctl_key_t" enum : "lldpctl_k_chassis_cap_enabled" and "lldpctl_k_config_chassis_cap_override"
    - Corrected some typos in previous comments

lldpd.c
    - Added check of capabilities override before setting new values in "lldpd_update_localchassis" function
    - Added check of capabilities override before setting initial value of "c_cap_enabled" to 0 in "lldpd_loop" function
    - Added initial set of "cfg->g_config.c_cap_override" to 0 in "lldpd_main" function

interfaces.c
    - Added check of capabilities override before setting new values in "interfaces_helper_chassis" function

display.c
    - Added new line to display the status of capabilities override in "show configration" command

lldpcli.8.in
    - Added new commands and descriptions to man file

21 months agobuild: update flake.lock
Vincent Bernat [Fri, 5 Aug 2022 10:38:29 +0000 (12:38 +0200)] 
build: update flake.lock

21 months agogithub: only build tags, master branch and pull requests
Vincent Bernat [Sat, 30 Jul 2022 09:37:05 +0000 (11:37 +0200)] 
github: only build tags, master branch and pull requests

21 months agogithub: revert last change
Vincent Bernat [Mon, 25 Jul 2022 05:32:48 +0000 (07:32 +0200)] 
github: revert last change

The template is shown as text, so no need to escape backticks.

21 months agogithub: show how to use triple backticks
Vincent Bernat [Mon, 25 Jul 2022 05:31:18 +0000 (07:31 +0200)] 
github: show how to use triple backticks

22 months agonetlink: fix indentation
Vincent Bernat [Mon, 11 Jul 2022 06:30:35 +0000 (08:30 +0200)] 
netlink: fix indentation

22 months agonetlink: ignore IPv6 temporary addresses
Vincent Bernat [Wed, 6 Jul 2022 20:56:29 +0000 (22:56 +0200)] 
netlink: ignore IPv6 temporary addresses

22 months agotests: really fix "too many VLANs" test
Vincent Bernat [Wed, 6 Jul 2022 20:44:24 +0000 (22:44 +0200)] 
tests: really fix "too many VLANs" test

We want to have a neighbor, but without VLANs.

22 months agodoc: add an entry for latest commit
Vincent Bernat [Wed, 6 Jul 2022 19:25:27 +0000 (21:25 +0200)] 
doc: add an entry for latest commit

Also fix the test!

22 months agolldp: don't send vlan when without_vlans is set
Florent Fourcot [Mon, 4 Jul 2022 08:46:06 +0000 (10:46 +0200)] 
lldp: don't send vlan when without_vlans is set

Fixes: 8e9dbbf80918 "lldp: don't send VLANs when there are too many of them
On interface with a lot of vlans, we still have "Too big packet"
notification on version 1.0.14

It looks like retry does exactly the same packet than first try

23 months agodebian: update debhelper to 9
Vincent Bernat [Sat, 21 May 2022 21:24:25 +0000 (23:24 +0200)] 
debian: update debhelper to 9

23 months agorelease: 1.0.14 1.0.14
Vincent Bernat [Sat, 21 May 2022 21:07:48 +0000 (23:07 +0200)] 
release: 1.0.14

2 years agoRevert "lib: update version-info"
Vincent Bernat [Sun, 15 May 2022 10:03:52 +0000 (12:03 +0200)] 
Revert "lib: update version-info"

This reverts commit e069bba4ec993cc4df14fab3a7108f43e3b66714. My bad,
this should not be changed just because of new stuff in enums. Only
additional functions require an update.

2 years agolib: update version-info
Vincent Bernat [Sun, 15 May 2022 10:02:41 +0000 (12:02 +0200)] 
lib: update version-info

This is reverse-compatible with previous versions.

2 years agodoc: add a NEWS entry for latest commits
Vincent Bernat [Sun, 15 May 2022 09:56:52 +0000 (11:56 +0200)] 
doc: add a NEWS entry for latest commits

2 years agodocs: fix discussion ID related to VLAN issues
Vincent Bernat [Sat, 14 May 2022 22:43:58 +0000 (00:43 +0200)] 
docs: fix discussion ID related to VLAN issues

2 years agodoc: Add docs for (un)configure inventory commands
Harshal Gohel [Thu, 14 Apr 2022 05:22:47 +0000 (10:52 +0530)] 
doc: Add docs for (un)configure inventory commands

2 years agotests: Add inventory configuration tests
Harshal Gohel [Mon, 11 Apr 2022 12:45:05 +0000 (18:15 +0530)] 
tests: Add inventory configuration tests

2 years agomed: Add configure inventory commands
Harshal Gohel [Mon, 11 Apr 2022 12:42:50 +0000 (18:12 +0530)] 
med: Add configure inventory commands

Default inventory information is fetched from dmi table.
Most of embedded devices do not run EFI bootloader hence dmi information
will not be available in /sys/class/dmi

- Add `configure inventory` commands
- Add `unconfigure inventory` commands
- New code is dependent on enable-lldpmed
- Add write support on lldpctl atoms
- Add support for setting inventory configuration in daemon
- Refactor `lldp_med` to assign `c_med_sw` only once.
  We have the configurability of inventory information, So
  it is not required for daemon to keep assigning `c_med_sw`

2 years agotests: ensure we free pyroute2 resources fix/too-many-vlans
Vincent Bernat [Sat, 14 May 2022 21:10:53 +0000 (23:10 +0200)] 
tests: ensure we free pyroute2 resources

2 years agolldp: don't send VLANs when there are too many of them
Vincent Bernat [Sat, 14 May 2022 20:58:00 +0000 (22:58 +0200)] 
lldp: don't send VLANs when there are too many of them

2 years agodoc: restore note about Intel cards
Vincent Bernat [Fri, 18 Mar 2022 22:11:51 +0000 (23:11 +0100)] 
doc: restore note about Intel cards

People using older versions of lldpd may not find this information
easily. So put it back in the README.

2 years agodocker: fix build on Alpine by requiring bsd-compat-headers for sys/queue.h
Vincent Bernat [Sat, 12 Mar 2022 14:12:42 +0000 (15:12 +0100)] 
docker: fix build on Alpine by requiring bsd-compat-headers for sys/queue.h

As it is self-contained, we could surely just include it.

2 years agoinclude: add back include/linux for old distributions
Vincent Bernat [Sat, 12 Mar 2022 13:30:06 +0000 (14:30 +0100)] 
include: add back include/linux for old distributions

However, we don't ship sys/queue.h and netinet/if_ether.h. At some
point, we may want to explore just shipping uapi directory. This has
been tested with Debian 8.

2 years agoinclude: nuke include directory for BSD and Linux
Vincent Bernat [Sat, 12 Mar 2022 13:00:24 +0000 (14:00 +0100)] 
include: nuke include directory for BSD and Linux

We keep OSX for now as it is small and isolated (and it's difficult to
test).

Fix #503 (but really, the patch is just included)

2 years agoci: only run distcheck if we are doing a release
Vincent Bernat [Fri, 11 Mar 2022 21:57:51 +0000 (22:57 +0100)] 
ci: only run distcheck if we are doing a release

2 years agoci: tentative to also build on FreeBSD/NetBSD/OpenBSD
Vincent Bernat [Thu, 10 Mar 2022 20:41:28 +0000 (21:41 +0100)] 
ci: tentative to also build on FreeBSD/NetBSD/OpenBSD

This could work with NetBSD, but this is far too slow. Give up on it.
Also, use different jobs for Linux and MacOS.

2 years agobuild: use `cc -E` instead of `cpp` to build atom list
Vincent Bernat [Fri, 11 Mar 2022 21:17:26 +0000 (22:17 +0100)] 
build: use `cc -E` instead of `cpp` to build atom list

For some reason, with OpenBSD, `cpp` only half expand the macros when
invoked as `cpp`, but it works just fine with `clang -E`.

2 years agobuild: define _OPENBSD_SOURCE on NetBSD
Vincent Bernat [Fri, 11 Mar 2022 06:37:47 +0000 (07:37 +0100)] 
build: define _OPENBSD_SOURCE on NetBSD

2 years agodoc: use @sysconfdir@ for /etc in manual pages
Vincent Bernat [Fri, 11 Mar 2022 06:26:54 +0000 (07:26 +0100)] 
doc: use @sysconfdir@ for /etc in manual pages

2 years agoci: try to run make check even with clang fix/check-clang
Vincent Bernat [Thu, 10 Mar 2022 20:44:56 +0000 (21:44 +0100)] 
ci: try to run make check even with clang

The mentioned issue has been solved.

2 years agobuild: explain current alternative
Vincent Bernat [Sun, 6 Feb 2022 09:14:45 +0000 (10:14 +0100)] 
build: explain current alternative

2 years agobuild: add a mention why we still use nix-gitignore
Vincent Bernat [Sun, 6 Feb 2022 09:04:15 +0000 (10:04 +0100)] 
build: add a mention why we still use nix-gitignore

2 years agobuild: use Nix flake
Vincent Bernat [Sun, 6 Feb 2022 08:53:41 +0000 (09:53 +0100)] 
build: use Nix flake

2 years agolldp: fix capitalization in error message
Vincent Bernat [Thu, 3 Feb 2022 19:21:39 +0000 (20:21 +0100)] 
lldp: fix capitalization in error message

2 years agolldp: report interface name on "Too big message"
Vincent Bernat [Tue, 1 Feb 2022 20:26:54 +0000 (21:26 +0100)] 
lldp: report interface name on "Too big message"

2 years agodaemon: add additional syscalls to SECCOMP filter when running in the foreground
David Sastre Medina [Tue, 11 Jan 2022 13:55:05 +0000 (14:55 +0100)] 
daemon: add additional syscalls to SECCOMP filter when running in the foreground

Running lldpd in the foreground as follows:

strace -c /usr/sbin/lldpd -d -cfse -D -C lldpd-peer -I lldpd-peer \
       -S lldpd-system-name -m 192.168.50.6

Requires additional syscalls to be filtered (non relevant syscalls removed):

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
  0.47    0.000026           6         4           ppoll
  0.33    0.000018           3         5           rt_sigprocmask
  0.27    0.000015           3         4           getsockopt
------ ----------- ----------- --------- --------- ----------------
100.00    0.005520           8       637        22 total

2 years agolinux: add access syscall to seccomp rules
Antonio Quartulli [Sun, 9 Jan 2022 14:24:55 +0000 (15:24 +0100)] 
linux: add access syscall to seccomp rules

Signed-off-by: Antonio Quartulli <a@unstable.cc>
2 years agointerfaces: detect interface index changes
Vincent Bernat [Sun, 12 Dec 2021 13:25:13 +0000 (14:25 +0100)] 
interfaces: detect interface index changes

When an interface is deleted and recreated, we didn't detect any
change and just updated its index. However, the handles we had on this
interface are now invalid. Ensure the interface is correctly
reinitialized in this case.

Fix #490.

2 years agotests: use @pytest.fixture instead of @pytest.yield_fixture
Vincent Bernat [Sun, 12 Dec 2021 13:28:23 +0000 (14:28 +0100)] 
tests: use @pytest.fixture instead of @pytest.yield_fixture

This works since 3.0 and the second form is therefore deprecated.

2 years agolib: avoid useless initialization of buffer
Vincent Bernat [Sun, 12 Dec 2021 13:00:40 +0000 (14:00 +0100)] 
lib: avoid useless initialization of buffer

2 years agointerfaces: on NetBSD, ifbic_req can use more than 64 bytes
Vincent Bernat [Wed, 1 Dec 2021 18:29:28 +0000 (19:29 +0100)] 
interfaces: on NetBSD, ifbic_req can use more than 64 bytes

Therefore, allocate it dynamically. Fix #489.

2 years agotests: fix compilation warning in marshalling test
Vincent Bernat [Sat, 27 Nov 2021 23:02:11 +0000 (00:02 +0100)] 
tests: fix compilation warning in marshalling test

2 years agobuild: add git and check to default.nix
Vincent Bernat [Sat, 27 Nov 2021 22:59:02 +0000 (23:59 +0100)] 
build: add git and check to default.nix

2 years agobuild: simplify a bit default.nix
Vincent Bernat [Sat, 27 Nov 2021 22:58:36 +0000 (23:58 +0100)] 
build: simplify a bit default.nix

2 years agolinux: add missing SECCOMP rules
Benedikt Neuffer [Sat, 27 Nov 2021 16:07:50 +0000 (17:07 +0100)] 
linux: add missing SECCOMP rules

Signed-off-by: Benedikt Neuffer <benedikt.neuffer@kit.edu>
2 years agoosx: update Brew recipe
Vincent Bernat [Sat, 13 Nov 2021 12:47:27 +0000 (13:47 +0100)] 
osx: update Brew recipe

2 years agorelease: 1.0.13 1.0.13
Vincent Bernat [Sat, 13 Nov 2021 12:05:00 +0000 (13:05 +0100)] 
release: 1.0.13

2 years agotests: stop complain about extra args when compiling checks
Vincent Bernat [Sat, 13 Nov 2021 12:28:19 +0000 (13:28 +0100)] 
tests: stop complain about extra args when compiling checks

This is expected. See: https://github.com/libcheck/check/pull/320

2 years agosonmp: fix heap overflow when reading SONMP packets
Vincent Bernat [Sun, 19 Sep 2021 19:18:47 +0000 (21:18 +0200)] 
sonmp: fix heap overflow when reading SONMP packets

By sending short SONMP packets, an attacker can make the decoder crash
by reading too much data on the heap. SONMP packets are fixed in size,
just ensure we get the enough bytes to contain a SONMP packet.

CVE-2021-43612

2 years agobuild: provide a clearer message if pkg-config is not installed
Vincent Bernat [Sat, 13 Nov 2021 08:24:27 +0000 (09:24 +0100)] 
build: provide a clearer message if pkg-config is not installed

2 years agodoc: add NEWS entry for latest commit
Vincent Bernat [Wed, 29 Sep 2021 10:03:42 +0000 (12:03 +0200)] 
doc: add NEWS entry for latest commit

2 years agoclient: do not set VLAN tag if client did not set it
Vincent Bernat [Wed, 29 Sep 2021 10:02:15 +0000 (12:02 +0200)] 
client: do not set VLAN tag if client did not set it

This fixes a bug where frames could be tagged with VLAN 0 after client
configuration.

2 years agodoc: replace the old py.test references by pytest
Jose Pedro Oliveira [Sun, 26 Sep 2021 19:15:00 +0000 (21:15 +0200)] 
doc: replace the old py.test references by pytest

2 years agointerfaces: on OpenBSD, ensure we get a device before setting its flags
Vincent Bernat [Wed, 22 Sep 2021 07:17:12 +0000 (09:17 +0200)] 
interfaces: on OpenBSD, ensure we get a device before setting its flags

2 years agolldpcli: remove redundant "ports" parameters from cap and mgmt cmds
Yaroslav Fedoriachenko [Tue, 21 Sep 2021 16:14:00 +0000 (19:14 +0300)] 
lldpcli: remove redundant "ports" parameters from cap and mgmt cmds

The commands below were introduced as global commands, but all of them
except the first one were missing code to ignore "ports" parameter
```
configure lldp capabilities-advertisements
unconfigure lldp capabilities-advertisements
unconfigure lldp management-addresses-advertisements
configure lldp management-addresses-advertisements
```

Signed-off-by: Yaroslav Fedoriachenko <yar.fed99@gmail.com>
2 years agobuild: more fallback to autoconf 2.69
Vincent Bernat [Tue, 21 Sep 2021 07:55:18 +0000 (09:55 +0200)] 
build: more fallback to autoconf 2.69

2 years agobuild: fallback to use autoconf 2.69 again
Vincent Bernat [Tue, 21 Sep 2021 07:52:15 +0000 (09:52 +0200)] 
build: fallback to use autoconf 2.69 again

Unfortunately, Ubuntu, used for CI on GitHub does not have 2.70 which
is needed for `AC_PROG_CC` to test for C99.

2 years agobuild: update to autoconf 2.71
Vincent Bernat [Tue, 21 Sep 2021 06:48:53 +0000 (08:48 +0200)] 
build: update to autoconf 2.71

This removes warning about deprecated stuff. Notably AC_PROG_CC now
does what AC_PROG_CC_C99 did.