From 9c5e3288574329004f903386faca8f1219794311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= Date: Sun, 22 Sep 2024 09:14:29 +0200 Subject: [PATCH 1/4] Bump to Alpine 3.20 --- .github/workflows/build_and_test.yml | 2 +- .github/workflows/package.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index d1a4fa5a47..15a3668843 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -74,7 +74,7 @@ jobs: config-zstd: ON - image: fedora39 config-zstd: OFF - - image: alpine317 + - image: alpine320 config-zstd: OFF steps: diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 18be35778a..5dd546183a 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -41,7 +41,7 @@ jobs: config-zstd: OFF - image: fedora39 config-zstd: OFF - - image: alpine317 + - image: alpine320 config-zstd: OFF steps: From 101f6cad059245fe8c5775ba5ba977f5dd089f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= Date: Sun, 22 Sep 2024 09:15:36 +0200 Subject: [PATCH 2/4] Bump to Fedora 40 --- .github/workflows/build_and_test.yml | 2 +- .github/workflows/package.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 15a3668843..9a402dd6c9 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -72,7 +72,7 @@ jobs: config-zstd: OFF - image: ubuntu2004-zstd config-zstd: ON - - image: fedora39 + - image: fedora40 config-zstd: OFF - image: alpine320 config-zstd: OFF diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 5dd546183a..62099da4a1 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -39,7 +39,7 @@ jobs: config-zstd: OFF - image: rhel94 config-zstd: OFF - - image: fedora39 + - image: fedora40 config-zstd: OFF - image: alpine320 config-zstd: OFF From 6b857ace60a5001c5850d2b02e3b83f9ed592d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= Date: Sun, 22 Sep 2024 09:24:07 +0200 Subject: [PATCH 3/4] ci: bump FreeBSD to 13.4 and 14.1 --- .github/workflows/build_and_test.yml | 4 ++-- .github/workflows/package.yml | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 9a402dd6c9..a8639934c7 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -585,12 +585,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: ["14.0", "13.2"] + version: ["14.1", "13.4"] steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Test in FreeBSD id: test - uses: vmactions/freebsd-vm@12c207ac1ba13827f25726fe93f9c2e6f685f0f3 # v1.0.8 + uses: vmactions/freebsd-vm@d7b8fcc7711aa41ad45e8d9b737cf90f035a7e3d # v1.1.3 with: release: ${{ matrix.version }} usesh: true diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 62099da4a1..3089fbdf3e 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -93,17 +93,16 @@ jobs: id-token: write strategy: matrix: - include: - - freebsd-version: "13.2" - - freebsd-version: "14.0" + version: ["14.1", "13.4"] + steps: - name: Checkout code uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Test in FreeBSD - uses: vmactions/freebsd-vm@12c207ac1ba13827f25726fe93f9c2e6f685f0f3 # v1.0.8 + uses: vmactions/freebsd-vm@d7b8fcc7711aa41ad45e8d9b737cf90f035a7e3d # v1.1.3 with: - release: ${{ matrix.freebsd-version }} + release: ${{ matrix.version }} envs: 'BUILD_DIR' usesh: true prepare: | From e5f6911c5337ee47d804fd4fe3f4a299dce2c79b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= Date: Sun, 22 Sep 2024 09:38:31 +0200 Subject: [PATCH 4/4] pcap++: pcaplivedevice avoid variable-length arrays --- Pcap++/src/PcapLiveDevice.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Pcap++/src/PcapLiveDevice.cpp b/Pcap++/src/PcapLiveDevice.cpp index 7ac0f79edc..5faa7c4dca 100644 --- a/Pcap++/src/PcapLiveDevice.cpp +++ b/Pcap++/src/PcapLiveDevice.cpp @@ -1011,15 +1011,15 @@ namespace pcpp return; } - uint8_t buf[len]; + std::vector buf(len); - if (sysctl(mib, 6, buf, &len, nullptr, 0) < 0) + if (sysctl(mib, 6, buf.data(), &len, nullptr, 0) < 0) { PCPP_LOG_DEBUG("Error in retrieving MAC address: sysctl 2 error"); return; } - struct if_msghdr* ifm = (struct if_msghdr*)buf; + struct if_msghdr* ifm = (struct if_msghdr*)buf.data(); struct sockaddr_dl* sdl = (struct sockaddr_dl*)(ifm + 1); uint8_t* ptr = (uint8_t*)LLADDR(sdl); m_MacAddress = MacAddress(ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5]);