dhcpoptinj
dhcpoptinj copied to clipboard
Add integration test
Create a test set up that can test packet mangling. It can be implemented using a docker container (remember --cap-add=NET_ADMIN and --cap-add=SYS_PTRACE --security-opt seccomp=unconfined would be handy to use container also for debugging) running dnsmasq + isc-dhcp-client.
Initial draft:
- inject a relay agent information option, use that as a tag in dnsmasq and send conditional options back. Parse the detailed DHCP log to identify that the DHCP request from the client was indeed mangled. No need to capture network traffic.
- Use dumpcap or similar and analyse network data directly. No need for dnsmasq.
With the first option a real-world-ish setup (the only one I have personally used) can be demonstrated and referred to in the help as an example to the user.
Use a CI/CD service to do build + test.