Репозитории ALT
S: | 4.4.3.P1-alt1 |
5.1: | 3.0.7-alt4 |
4.1: | 3.0.6-alt2.M41.1 |
4.0: | 3.0.6-alt1 |
3.0: | 3.0.2-alt1 |
Группа :: Система/Серверы
Пакет: dhcp
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: 0037-dhcrelay-fix-relaying-of-return-packets.patch
Скачать
Скачать
From 0 Mon Sep 17 00:00:00 2001
From: "Steinar H. Gunderson" <sgunderson@bigfoot.com>
Date: Fri, 7 Dec 2018 21:11:06 +0300
Subject: [PATCH 37] dhcrelay: fix relaying of return packets
diff --git a/dhcp/common/discover.c b/dhcp/common/discover.c
index defaced..defaced 100644
--- a/dhcp/common/discover.c
+++ b/dhcp/common/discover.c
@@ -768,9 +768,9 @@ discover_interfaces(int state) {
INTERFACE_REQUESTED);
#ifdef DHCPv6
- if (!(tmp->flags & INTERFACE_REQUESTED)) {
+ if (!(tmp->flags & INTERFACE_REQUESTED) && state != DISCOVER_RELAY) {
#else
- if (!tmp -> ifp || !(tmp -> flags & INTERFACE_REQUESTED)) {
+ if (!tmp -> ifp || (!(tmp -> flags & INTERFACE_REQUESTED) && state != DISCOVER_RELAY)) {
#endif /* DHCPv6 */
if ((tmp -> flags & INTERFACE_REQUESTED) != ir)
log_fatal ("%s: not found", tmp -> name);
diff --git a/dhcp/relay/dhcrelay.c b/dhcp/relay/dhcrelay.c
index defaced..defaced 100644
--- a/dhcp/relay/dhcrelay.c
+++ b/dhcp/relay/dhcrelay.c
@@ -993,6 +993,11 @@ do_relay4(struct interface_info *ip, struct dhcp_packet *packet,
return;
}
+ /* If this is not a BOOTREPLY, and it is not on a requested interface,
+ * drop it. */
+ if (!(ip->flags & INTERFACE_REQUESTED))
+ return;
+
/* Add relay agent options if indicated. If something goes wrong,
* drop the packet. Note this may set packet->giaddr if RFC3527
* is enabled. */