Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to Alpine 3.20, Fedora 40, FreeBSD 13.4 and 14.1 #1588

Merged
merged 4 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ jobs:
config-zstd: OFF
- image: ubuntu2004-zstd
config-zstd: ON
- image: fedora39
- image: fedora40
config-zstd: OFF
- image: alpine317
- image: alpine320
config-zstd: OFF

steps:
Expand Down Expand Up @@ -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
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
config-zstd: OFF
- image: rhel94
config-zstd: OFF
- image: fedora39
- image: fedora40
config-zstd: OFF
- image: alpine317
- image: alpine320
config-zstd: OFF

steps:
Expand Down Expand Up @@ -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: |
Expand Down
6 changes: 3 additions & 3 deletions Pcap++/src/PcapLiveDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1011,15 +1011,15 @@ namespace pcpp
return;
}

uint8_t buf[len];
std::vector<uint8_t> buf(len);
clementperon marked this conversation as resolved.
Show resolved Hide resolved

if (sysctl(mib, 6, buf, &len, nullptr, 0) < 0)
if (sysctl(mib, 6, buf.data(), &len, nullptr, 0) < 0)
clementperon marked this conversation as resolved.
Show resolved Hide resolved
{
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);
clementperon marked this conversation as resolved.
Show resolved Hide resolved
uint8_t* ptr = (uint8_t*)LLADDR(sdl);
m_MacAddress = MacAddress(ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5]);
Expand Down
Loading