-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dns/dnsmasq: Fix --dhcp-relay not working on FreeBSD
PR: 283138 MFH: 2024Q2 Reported by: Harald Schmalzbauer Obtained from: Simon Kelley, https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commitdiff;h=5a1f2c577db58ea47727f1b6900c0be25e6db205 (cherry picked from commit b572f52)
- Loading branch information
Showing
3 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- CHANGELOG.orig 2024-02-13 13:49:15 UTC | ||
+++ CHANGELOG | ||
@@ -1,3 +1,7 @@ | ||
+post version 2.90 | ||
+ Fix broken dhcp-relay on *BSD. Thanks to Harold for finding | ||
+ this problem. | ||
+ | ||
version 2.90 | ||
Fix reversion in --rev-server introduced in 2.88 which | ||
caused breakage if the prefix length is not exactly divisible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- src/dhcp.c.orig 2024-02-13 13:49:15 UTC | ||
+++ src/dhcp.c | ||
@@ -1121,6 +1121,9 @@ static int relay_upstream4(int iface_index, struct dhc | ||
to.sa.sa_family = AF_INET; | ||
to.in.sin_addr = relay->server.addr4; | ||
to.in.sin_port = htons(relay->port); | ||
+#ifdef HAVE_SOCKADDR_SA_LEN | ||
+ to.in.sin_len = sizeof(struct sockaddr_in); | ||
+#endif | ||
|
||
/* Broadcasting to server. */ | ||
if (relay->server.addr4.s_addr == 0) |