The `request` argument to handlers passes the full DHCPv6 message as
received by the server. Notably, relayed messages will stay encapsulated
in each other. These two plugins (server_id and file) are accessing the
options of the outermost message, causing incorrect behavior when
handling relayed messages.
Signed-off-by: Anatole Denis <anatole@unverle.fr>
The RFC is a bit more verbose than "reject when DUIDs mismatch".
This patch adds these conditions as expressed in the various
subsections of RFC8416 section 16
Signed-off-by: Anatole Denis <anatole@unverle.fr>
For V6ServerID to be nil, either:
* The handler is running before setupServer6 ran (should be impossible)
* Some other code modified V6ServerID outside of this plugin
which is probably worth aborting as well.
Unexport V6ServerID (and v4ServerID) to prevent this second one
Signed-off-by: Anatole Denis <anatole@unverle.fr>
From [RFC8415](https://tools.ietf.org/html/rfc8415#section-16.4):
```
Servers MUST discard any received Request message that meets any of
the following conditions:
[...]
- the contents of the Server Identifier option do not match the
server's DUID.
```
Closes#36
Signed-off-by: Anatole Denis <anatole@unverle.fr>