diff options
-rw-r--r-- | .github/workflows/run-tests-32bit.yml | 2 | ||||
-rw-r--r-- | .github/workflows/run-tests-bigendian.yml | 10 | ||||
-rw-r--r-- | .github/workflows/run-tests.yml | 2 | ||||
-rw-r--r-- | accel-pppd/ipv6/dhcpv6.c | 29 |
4 files changed, 36 insertions, 7 deletions
diff --git a/.github/workflows/run-tests-32bit.yml b/.github/workflows/run-tests-32bit.yml index 5f635b73..94d158ab 100644 --- a/.github/workflows/run-tests-32bit.yml +++ b/.github/workflows/run-tests-32bit.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - distro: [latest-stable, edge] + distro: [v3.20] steps: - name: Check out repository code diff --git a/.github/workflows/run-tests-bigendian.yml b/.github/workflows/run-tests-bigendian.yml index 0e98ab47..d5dce83b 100644 --- a/.github/workflows/run-tests-bigendian.yml +++ b/.github/workflows/run-tests-bigendian.yml @@ -39,8 +39,8 @@ jobs: run: | ssh-keygen -t ed25519 -q -N "" -f ssh-key qemu-img create -f raw disk.raw 5G - wget -nv https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/s390x/netboot/vmlinuz-lts - wget -nv https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/s390x/netboot/initramfs-lts + wget -nv https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/s390x/netboot/vmlinuz-lts + wget -nv https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/s390x/netboot/initramfs-lts - name: Run http server for ssh-key run: | sudo ip addr add 192.0.2.1/32 dev lo # stable ip for http server @@ -54,8 +54,8 @@ jobs: -drive format=raw,file=disk.raw -kernel vmlinuz-lts -initrd initramfs-lts - -append "ip=dhcp alpine_repo=https://dl-cdn.alpinelinux.org/alpine/latest-stable/main - modloop=https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/s390x/netboot/modloop-lts + -append "ip=dhcp alpine_repo=https://dl-cdn.alpinelinux.org/alpine/v3.20/main + modloop=https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/s390x/netboot/modloop-lts ssh_key=http://192.0.2.1:8000/ssh-key.pub" - name: Check that target OS is running run: | @@ -77,7 +77,7 @@ jobs: echo '' >> setup_alpine_conf && echo 'DISKOPTS=\"-m sys /dev/vda\"' >> setup_alpine_conf && echo 'ROOTSSHKEY=\"http://192.0.2.1:8000/ssh-key.pub\"' >> setup_alpine_conf && - echo 'APKREPOSOPTS=\"https://dl-cdn.alpinelinux.org/alpine/latest-stable/main\"' >> setup_alpine_conf && + echo 'APKREPOSOPTS=\"https://dl-cdn.alpinelinux.org/alpine/v3.20/main\"' >> setup_alpine_conf && cat setup_alpine_conf && yes | setup-alpine -e -f setup_alpine_conf" - name: Poweroff the VM diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b217d71d..6fdd5bda 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -222,7 +222,7 @@ jobs: run: | mkdir img # we need to use metal image because virt image doesn't provide pppoe driver (https://gitlab.alpinelinux.org/alpine/aports/-/issues/13739) - wget -nv https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/cloud/nocloud_alpine-3.20.2-x86_64-bios-cloudinit-metal-r0.qcow2 -O img/image + wget -nv https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/cloud/nocloud_alpine-3.20.3-x86_64-bios-cloudinit-metal-r0.qcow2 -O img/image qemu-img resize -f qcow2 img/`ls -1 img` +2G - name: Run target OS first time (for cloud-init actions) run: sudo qemu-system-x86_64 -enable-kvm -cpu host -m 4096 -nographic -drive format=qcow2,file=img/`ls -1 img` -drive format=raw,file=init.img diff --git a/accel-pppd/ipv6/dhcpv6.c b/accel-pppd/ipv6/dhcpv6.c index 77fc32f7..85863e0c 100644 --- a/accel-pppd/ipv6/dhcpv6.c +++ b/accel-pppd/ipv6/dhcpv6.c @@ -752,6 +752,32 @@ static void dhcpv6_recv_rebind(struct dhcpv6_packet *req) dhcpv6_send_reply2(req, pd, D6_REPLY); } +static void dhcpv6_recv_confirm(struct dhcpv6_packet *req) +{ + struct dhcpv6_pd *pd = req->pd; + + if (!req->clientid) { + log_ppp_error("dhcpv6: no Client-ID option\n"); + return; + } + + if (req->serverid) { + log_ppp_error("dhcpv6: unexcpected Server-ID option\n"); + return; + } + + if (!pd->clientid) + return; + else if (pd->clientid->hdr.len != req->clientid->hdr.len || memcmp(pd->clientid, req->clientid, sizeof(struct dhcpv6_opt_hdr) + ntohs(req->clientid->hdr.len))) { + log_ppp_error("dhcpv6: unmatched Client-ID option\n"); + return; + } + + req->serverid = conf_serverid; + + dhcpv6_send_reply(req, pd, D6_REPLY); +} + static void dhcpv6_recv_release(struct dhcpv6_packet *pkt) { // don't answer @@ -783,6 +809,9 @@ static void dhcpv6_recv_packet(struct dhcpv6_packet *pkt) case D6_REBIND: dhcpv6_recv_rebind(pkt); break; + case D6_CONFIRM: + dhcpv6_recv_confirm(pkt); + break; case D6_RELEASE: dhcpv6_recv_release(pkt); break; |