diff options
| -rw-r--r-- | .github/workflows/build-and-run.yml | 7 | ||||
| -rw-r--r-- | .github/workflows/run-tests-bigendian.yml | 12 | ||||
| -rw-r--r-- | .github/workflows/run-tests.yml | 10 | ||||
| -rw-r--r-- | accel-pppd/ctrl/ipoe/dhcpv4.c | 5 | ||||
| -rw-r--r-- | accel-pppd/ctrl/pptp/pptp_prot.h | 1 | ||||
| -rw-r--r-- | accel-pppd/ctrl/sstp/sstp.c | 4 | ||||
| -rw-r--r-- | accel-pppd/radius/acct.c | 5 | ||||
| -rw-r--r-- | accel-pppd/utils.h | 4 | ||||
| -rw-r--r-- | tests/common/veth.py | 26 |
9 files changed, 38 insertions, 36 deletions
diff --git a/.github/workflows/build-and-run.yml b/.github/workflows/build-and-run.yml index 9caf31cf..67c688d8 100644 --- a/.github/workflows/build-and-run.yml +++ b/.github/workflows/build-and-run.yml @@ -20,6 +20,9 @@ jobs: - distro: ubuntu-24.04 pkg-distro: ubuntu24.04 cpack-type: Ubuntu24 + - distro: ubuntu-26.04 + pkg-distro: ubuntu26.04 + cpack-type: Ubuntu24 runs-on: ${{ matrix.distro }} steps: - name: Set common vars @@ -83,12 +86,12 @@ jobs: matrix: distro: [ - "debian:11", "debian:12", "debian:13", "debian:forky", "ubuntu:22.04", "ubuntu:24.04", + "ubuntu:26.04", "ubuntu:devel" ] runs-on: ubuntu-24.04 @@ -103,8 +106,8 @@ jobs: debian:forky) DISTRO=debian13; CPACK_TYPE=Debian13 ;; debian:13) DISTRO=debian13; CPACK_TYPE=Debian13 ;; debian:12) DISTRO=debian12; CPACK_TYPE=Debian12 ;; - debian:11) CPACK_TYPE=Debian11 ;; ubuntu:devel) CPACK_TYPE=Ubuntu24 ; HEADERS_SUFFIX=generic ;; + ubuntu:26.04) CPACK_TYPE=Ubuntu24 ; HEADERS_SUFFIX=generic ;; ubuntu:24.04) CPACK_TYPE=Ubuntu24 ; HEADERS_SUFFIX=generic ;; ubuntu:22.04) CPACK_TYPE=Ubuntu22 ; HEADERS_SUFFIX=generic ;; esac; diff --git a/.github/workflows/run-tests-bigendian.yml b/.github/workflows/run-tests-bigendian.yml index 6808900d..bce49c35 100644 --- a/.github/workflows/run-tests-bigendian.yml +++ b/.github/workflows/run-tests-bigendian.yml @@ -11,7 +11,7 @@ jobs: Test-in-Alpine-s390x: #if: ${{ false }} # disable for now - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 name: Test in Qemu (s390x Alpine) steps: @@ -26,15 +26,7 @@ jobs: NEEDRESTART_SUSPEND=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true sudo -E apt -y install wget openssh-client screen libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev libslirp-dev ninja-build - - name: Build Qemu 9.1.2 - # Qemu 8.2 from Ubuntu24.04 has critical s390x-related bugs so Qemu9 is required - run: | - wget -nv https://github.com/qemu/qemu/archive/refs/tags/v9.1.2.tar.gz - tar -xf v9.1.2.tar.gz - cd qemu-9.1.2 - ./configure --target-list=s390x-softmmu --enable-slirp - make -j - sudo make install + qemu-system-s390x qemu-utils qemu-system-data - name: Prepare qemu files run: | ssh-keygen -t ed25519 -q -N "" -f ssh-key diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 7ce55b6e..337e23df 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -16,6 +16,11 @@ jobs: fail-fast: false matrix: include: + - distro: Ubuntu-26.04 + image: https://cloud-images.ubuntu.com/resolute/current/resolute-server-cloudimg-amd64v3.img + untar: false + format: qcow2 + - distro: Ubuntu-24.04 image: https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img untar: false @@ -36,11 +41,6 @@ jobs: untar: true format: raw - - distro: Debian11 - image: https://cdimage.debian.org/images/cloud/bullseye/latest/debian-11-generic-amd64.tar.xz - untar: true - format: raw - steps: - name: Check out repository code uses: actions/checkout@v4 diff --git a/accel-pppd/ctrl/ipoe/dhcpv4.c b/accel-pppd/ctrl/ipoe/dhcpv4.c index f1427e17..2bd59437 100644 --- a/accel-pppd/ctrl/ipoe/dhcpv4.c +++ b/accel-pppd/ctrl/ipoe/dhcpv4.c @@ -24,15 +24,12 @@ #include "ipdb.h" #include "radius.h" #include "dhcp_attr_defs.h" +#include "utils.h" #include "dhcpv4.h" #define BUF_SIZE 4096 -#ifndef max -#define max(x,y) ((x) > (y) ? (x) : (y)) -#endif - struct dhcpv4_relay_ctx { struct list_head entry; struct triton_context_t *ctx; diff --git a/accel-pppd/ctrl/pptp/pptp_prot.h b/accel-pppd/ctrl/pptp/pptp_prot.h index ee8cb341..3726334a 100644 --- a/accel-pppd/ctrl/pptp/pptp_prot.h +++ b/accel-pppd/ctrl/pptp/pptp_prot.h @@ -281,7 +281,6 @@ struct pptp_set_link_info /* for control message type 15 */ (type==PPTP_WAN_ERR_NTFY )?sizeof(struct pptp_wan_err_ntfy): \ (type==PPTP_SET_LINK_INFO )?sizeof(struct pptp_set_link_info): \ 0) -#define max(a,b) (((a)>(b))?(a):(b)) #define PPTP_CTRL_SIZE_MAX ( \ max(sizeof(struct pptp_start_ctrl_conn), \ max(sizeof(struct pptp_echo_rqst), \ diff --git a/accel-pppd/ctrl/sstp/sstp.c b/accel-pppd/ctrl/sstp/sstp.c index c3cd111d..0920f5af 100644 --- a/accel-pppd/ctrl/sstp/sstp.c +++ b/accel-pppd/ctrl/sstp/sstp.c @@ -50,10 +50,6 @@ #include "sstp_prot.h" #include "if_ppposeq.h" -#ifndef max -#define max(x,y) ((x) > (y) ? (x) : (y)) -#endif - #define PPP_BUF_SIZE 8192 #define PPP_BUF_IOVEC 256 #define PPP_F_ESCAPE 1 diff --git a/accel-pppd/radius/acct.c b/accel-pppd/radius/acct.c index e9b2147f..8a344516 100644 --- a/accel-pppd/radius/acct.c +++ b/accel-pppd/radius/acct.c @@ -13,15 +13,12 @@ #include "backup.h" #include "ap_session_backup.h" #include "iputils.h" +#include "utils.h" #include "radius_p.h" #include "memdebug.h" -#ifndef max -#define max(x,y) ((x) > (y) ? (x) : (y)) -#endif - #define INTERIM_SAFE_TIME 10 static int req_set_stat(struct rad_req_t *req, struct ap_session *ses) diff --git a/accel-pppd/utils.h b/accel-pppd/utils.h index 7c62422c..6c03299f 100644 --- a/accel-pppd/utils.h +++ b/accel-pppd/utils.h @@ -10,6 +10,10 @@ #define min(x, y) ((x) < (y) ? (x) : (y)) #endif +#ifndef max +#define max(x, y) ((x) > (y) ? (x) : (y)) +#endif + /* * Fixed-size memcpy() lets the compiler emit efficient unaligned accesses on * architectures that support them without imposing alignment or aliasing diff --git a/tests/common/veth.py b/tests/common/veth.py index c9d3006c..9d51ab7a 100644 --- a/tests/common/veth.py +++ b/tests/common/veth.py @@ -2,11 +2,16 @@ from common import process, netns, vlan, iface import time import math -# creates veth pair. if ok returns 0 -def create_pair(name_a, name_b): - veth, out, err = process.run( - ["ip", "link", "add", name_a, "type", "veth", "peer", "name", name_b] - ) +# creates veth pair, optionally with fixed hardware addresses. if ok returns 0 +def create_pair(name_a, name_b, mac_a=None, mac_b=None): + command = ["ip", "link", "add", name_a] + if mac_a: + command += ["address", mac_a] + command += ["type", "veth", "peer", "name", name_b] + if mac_b: + command += ["address", mac_b] + + veth, out, err = process.run(command) print("veth.create: exit=%d out=%s err=%s" % (veth, out, err)) return veth @@ -32,7 +37,16 @@ def create_veth_pair_netns(veth_pair_vlans_config): veth_a = "A" + name veth_b = "B" + name - pair_status = create_pair(veth_a, veth_b) + + # fixed addresses: a veth pair created without them gets random ones, which + # systemd-udevd may replace right after creation (MACAddressPolicy in its + # .link rules). accel-pppd reads the address of the interface it serves once + # at startup, so when udev wins that race the daemon advertises an address + # the interface no longer has and the session never passes a frame. + # See https://github.com/accel-ppp/accel-ppp/issues/363 + num = int(name) + mac = "02:00:%02x:%02x:%02x:" % ((num >> 16) & 0xFF, (num >> 8) & 0xFF, num & 0xFF) + pair_status = create_pair(veth_a, veth_b, mac + "0a", mac + "0b") print("create_veth_pair_netns: pair_status=%d" % pair_status) iface.up(veth_a, None) |
