Add the ability to specify destination port in DHCP-relay mode.

This change also removes a previous bug
where --dhcp-alternate-port would affect the port used
to relay _to_ as well as the port being listened on.
The new feature allows configuration to provide bug-for-bug
compatibility, if required. Thanks to Damian Kaczkowski
for the feature suggestion.
This commit is contained in:
Simon Kelley committed 2022-05-26 16:40:44 +01:00
1 parent f65d210012
commit a267a9e489
7 files changed
+36 -7

No files matched your search

+1 -1
View File
@@ -2170,7 +2170,7 @@ int relay_upstream6(int iface_index, ssize_t sz,
to.sa.sa_family = AF_INET6;
to.in6.sin6_addr = relay->server.addr6;
to.in6.sin6_port = htons(DHCPV6_SERVER_PORT);
to.in6.sin6_port = htons(relay->port);
to.in6.sin6_flowinfo = 0;
to.in6.sin6_scope_id = 0;