diff options
author | Renato Botelho <garga@FreeBSD.org> | 2016-07-11 15:27:07 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2016-07-11 15:27:07 -0300 |
commit | 1498c505c340dba7667953ec7237854f6326addb (patch) | |
tree | ba2f7b4d7dfa629e18654ed96b15c3ff4cabd78f | |
parent | 1f1e72ffb5c1a39c14d65e2ff69a430c07f4344f (diff) | |
download | FreeBSD-ports-1498c505c340dba7667953ec7237854f6326addb.zip FreeBSD-ports-1498c505c340dba7667953ec7237854f6326addb.tar.gz |
Import debian patch to fix #6355
References:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648401
http://anonscm.debian.org/cgit/pkg-dhcp/isc-dhcp.git/tree/debian/patches/dhcrelay-listen.patch
https://forum.pfsense.org/index.php?topic=110901.0
-rw-r--r-- | net/isc-dhcp43-server/Makefile | 2 | ||||
-rw-r--r-- | net/isc-dhcp43-server/files/patch-fix_relay_return_packets | 31 |
2 files changed, 32 insertions, 1 deletions
diff --git a/net/isc-dhcp43-server/Makefile b/net/isc-dhcp43-server/Makefile index 07fa00e..1927276 100644 --- a/net/isc-dhcp43-server/Makefile +++ b/net/isc-dhcp43-server/Makefile @@ -19,7 +19,7 @@ USES= gmake PORTREVISION_SERVER= 0 PORTREVISION_CLIENT= 0 -PORTREVISION_RELAY= 0 +PORTREVISION_RELAY= 1 SUBSYS?= server diff --git a/net/isc-dhcp43-server/files/patch-fix_relay_return_packets b/net/isc-dhcp43-server/files/patch-fix_relay_return_packets new file mode 100644 index 0000000..815c2df --- /dev/null +++ b/net/isc-dhcp43-server/files/patch-fix_relay_return_packets @@ -0,0 +1,31 @@ +description: fix relaying of return packets +author: Steinar H. Gunderson <sgunderson@bigfoot.com> + +--- common/discover.c ++++ common/discover.c +@@ -1104,9 +1104,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); +--- relay/dhcrelay.c ++++ relay/dhcrelay.c +@@ -787,6 +787,11 @@ do_relay4(struct interface_info *ip, str + if (out) + 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. */ |