Relay-forward Message's Hop Limit should be 32 (#1147240)
This commit is contained in:
parent
91172b8573
commit
5bf5d8904c
39
dhcp-relay-hop-limit.patch
Normal file
39
dhcp-relay-hop-limit.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From f3d697a84e90f31a86874e334240ee1360a2fbf8 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Popelka <jpopelka@redhat.com>
|
||||
Date: Thu, 9 Oct 2014 18:57:22 +0200
|
||||
Subject: [PATCH] Work-around for hop-limit set to 1
|
||||
|
||||
---
|
||||
common/socket.c | 16 +++++++++++++++-
|
||||
1 file changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/common/socket.c b/common/socket.c
|
||||
index b8b44a6..93406ef 100644
|
||||
--- a/common/socket.c
|
||||
+++ b/common/socket.c
|
||||
@@ -301,7 +301,21 @@ if_register_socket(struct interface_info *info, int family,
|
||||
}
|
||||
|
||||
if ((family == AF_INET6) &&
|
||||
- ((info->flags & INTERFACE_UPSTREAM) != 0)) {
|
||||
+ /*
|
||||
+ * rfc3315 says that: "If relay agent relays messages to
|
||||
+ * All_DHCP_Servers multicast address or other multicast addresses,
|
||||
+ * it sets the Hop Limit field to 32."
|
||||
+ *
|
||||
+ * Because we use the same socket for all (upper/lower)
|
||||
+ * interfaces, the hop limit is the same for both/all.
|
||||
+ * There should be INTERFACE_UPSTREAM in the below condition, but
|
||||
+ * problem is when the interface which registers the socket is
|
||||
+ * lower interface, in that case the hop limit was not set
|
||||
+ * (i.e. set to 1) for both.
|
||||
+ * Because rfc doesn't say anything about hop limit for lower,
|
||||
+ * it'd be lesser evil to have 32 in both cases.
|
||||
+ */
|
||||
+ ((info->flags & INTERFACE_STREAMS) != 0)) {
|
||||
int hop_limit = 32;
|
||||
if (setsockopt(sock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS,
|
||||
&hop_limit, sizeof(int)) < 0) {
|
||||
--
|
||||
2.1.0
|
||||
|
@ -18,7 +18,7 @@
|
||||
Summary: Dynamic host configuration protocol software
|
||||
Name: dhcp
|
||||
Version: 4.3.1
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
||||
# dcantrell maintaining the package) made incorrect use of the epoch and
|
||||
# that's why it is at 12 now. It should have never been used, but it was.
|
||||
@ -75,6 +75,7 @@ Patch35: dhcp-ffff-checksum.patch
|
||||
Patch36: dhcp-sd_notify.patch
|
||||
Patch37: dhcp-dhc6-life.patch
|
||||
Patch38: dhcp-skip-vlan.patch
|
||||
Patch39: dhcp-relay-hop-limit.patch
|
||||
|
||||
Patch100: dhcp-bind996.patch
|
||||
|
||||
@ -330,6 +331,9 @@ rm -rf includes/isc-dhcp
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #37415])
|
||||
%patch38 -p1 -b .vlan
|
||||
|
||||
# Relay-forward Message's Hop Limit should be 32 (#1147240)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #37426])
|
||||
%patch39 -p1 -b .hop-limit
|
||||
|
||||
# to build against bind-9.9.6
|
||||
%patch100 -p1 -b .bind996
|
||||
@ -604,6 +608,9 @@ done
|
||||
%doc doc/html/
|
||||
|
||||
%changelog
|
||||
* Fri Oct 10 2014 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.1-10
|
||||
- Relay-forward Message's Hop Limit should be 32 (#1147240)
|
||||
|
||||
* Wed Oct 08 2014 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.1-9
|
||||
- dhcpd generates spurious responses when seeing requests
|
||||
from vlans on plain interface (#1150587)
|
||||
|
Loading…
Reference in New Issue
Block a user