dhcpd generates spurious responses when seeing requests from vlans on plain interface (#1150587)

This commit is contained in:
Jiri Popelka 2014-10-08 19:25:32 +02:00
parent 8739746584
commit 891293f996
2 changed files with 26 additions and 1 deletions

16
dhcp-skip-vlan.patch Normal file
View File

@ -0,0 +1,16 @@
diff -up dhcp-4.3.1/common/lpf.c.vlan dhcp-4.3.1/common/lpf.c
--- dhcp-4.3.1/common/lpf.c.vlan 2014-10-08 19:06:17.963118201 +0200
+++ dhcp-4.3.1/common/lpf.c 2014-10-08 19:07:17.086276536 +0200
@@ -543,6 +543,12 @@ ssize_t receive_packet (interface, buf,
if (cmsg->cmsg_level == SOL_PACKET &&
cmsg->cmsg_type == PACKET_AUXDATA) {
struct tpacket_auxdata *aux = (void *)CMSG_DATA(cmsg);
+ /* if listening on plain interface we can see vlan traffic as well.
+ skip vlan traffic if tagged. If we are listening on vlan interfaces
+ as well we will see the traffic again but without the tag
+ */
+ if (aux->tp_vlan_tci != 0)
+ return 0;
nocsum = aux->tp_status & TP_STATUS_CSUMNOTREADY;
}
}

View File

@ -18,7 +18,7 @@
Summary: Dynamic host configuration protocol software
Name: dhcp
Version: 4.3.1
Release: 8%{?dist}
Release: 9%{?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.
@ -74,6 +74,7 @@ Patch34: dhcp-no-subnet-error2info.patch
Patch35: dhcp-ffff-checksum.patch
Patch36: dhcp-sd_notify.patch
Patch37: dhcp-dhc6-life.patch
Patch38: dhcp-skip-vlan.patch
BuildRequires: autoconf
BuildRequires: automake
@ -323,6 +324,10 @@ rm -rf includes/isc-dhcp
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #37084])
%patch37 -p1 -b .life
# dhcpd generates spurious responses when seeing requests from vlans on plain interface (#1150587)
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #37415])
%patch38 -p1 -b .vlan
# Update paths in all man pages
for page in client/dhclient.conf.5 client/dhclient.leases.5 \
client/dhclient-script.8 client/dhclient.8 ; do
@ -593,6 +598,10 @@ done
%doc doc/html/
%changelog
* 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)
* Fri Oct 03 2014 Tomas Hozza <thozza@redhat.com> - 12:4.3.1-8
- rebuild against bind-9.9.6