- Reject peer exports by comparing the resolved UE pointer with session->UE. - Restore original selector resolution so valid own handovers retain protocol semantics.
25 lines
844 B
Docker
25 lines
844 B
Docker
# syntax=docker/dockerfile:1
|
|
FROM --platform=$BUILDPLATFORM python:3.12-slim AS patcher
|
|
|
|
COPY bin/towercore-linux-mips64le /towercore
|
|
RUN python - <<'PY'
|
|
from pathlib import Path
|
|
|
|
path = Path("/towercore")
|
|
data = bytearray(path.read_bytes())
|
|
patches = (
|
|
(0x22E78, bytes.fromhex("0c 00 44 14"), bytes.fromhex("0c 00 14 16")),
|
|
(0x24604, bytes.fromhex("84 00 c2 90"), bytes.fromhex("25 10 00 00")),
|
|
(0x2487C, bytes.fromhex("84 00 c2 90"), bytes.fromhex("25 10 00 00")),
|
|
)
|
|
for offset, original, replacement in patches:
|
|
actual = bytes(data[offset : offset + len(original)])
|
|
if actual != original:
|
|
raise SystemExit(f"unexpected bytes at {offset:#x}: {actual.hex()}")
|
|
data[offset : offset + len(original)] = replacement
|
|
path.write_bytes(data)
|
|
PY
|
|
|
|
FROM towercore:final-mips64le
|
|
COPY --from=patcher /towercore /towercore
|