This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from jacobweinstock/fix-relay-interactions
Unicast to the giaddr address when non zero: ## Description <!--- Please describe what this PR is going to change --> When the DHCP header `giaddr` is set, we must unicast responses to that address. [DHCP RFC](https://www.ietf.org/rfc/rfc2131.txt) section 4.1, page 22: > "If the 'giaddr' field in a DHCP message from a client is non-zero, the server sends any return messages to the 'DHCP server' port on the BOOTP relay agent whose address appears in 'giaddr'." In addition to not being to spec, sending responses to the direct peer causes that a relay agent that sent a unicast request doesn't receive the expected unicast response if there is more than one relay in the mix. This is observed with the v0.4.2 Tink stack helm chart as we deploy a DHCP relay as part of the stack. Current Traffic flow for the Helm chart deployment. Traffic from the relay container (inside the tink stack deployment) doesn't unicast responses to the network's relay agent. ```bash ▲ │ │ broadcast │ │ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ │ machine │◀─────broadcast───▶│ relay │──────unicast─────▶│relay container│◀──────unicast──────▶│ Smee │ └───────────────┘ └───────────────┘ └───────────────┘ └───────────────┘ ``` ## Why is this needed <!--- Link to issue you have raised --> Fixes: #tinkerbell/smee#382 ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> Manually testing using the v0.4.2 helm chart. Traffic will now make it back to the network's relay agent: ```ascii ┌───────────────┐ ┌────────────│ Smee │◀───────┐ │ └───────────────┘ │ unicast unicast │ │ ▼ │ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ │ machine │◀─────broadcast────▶│ relay │───────unicast──────▶│relay container│ └───────────────┘ └───────────────┘ └───────────────┘ ``` ## How are existing users impacted? What migration steps/scripts do we need? <!--- Fixes a bug, unblocks installation, removes a component of the stack etc --> <!--- Requires a DB migration script, etc. --> ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
- Loading branch information