From 891293f9960972d047206ec4880d2de77a43989c Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Wed, 8 Oct 2014 19:25:32 +0200 Subject: [PATCH] dhcpd generates spurious responses when seeing requests from vlans on plain interface (#1150587) --- dhcp-skip-vlan.patch | 16 ++++++++++++++++ dhcp.spec | 11 ++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 dhcp-skip-vlan.patch diff --git a/dhcp-skip-vlan.patch b/dhcp-skip-vlan.patch new file mode 100644 index 0000000..caf6f4c --- /dev/null +++ b/dhcp-skip-vlan.patch @@ -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; + } + } diff --git a/dhcp.spec b/dhcp.spec index 1519292..c13ede1 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -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 - 12:4.3.1-9 +- dhcpd generates spurious responses when seeing requests + from vlans on plain interface (#1150587) + * Fri Oct 03 2014 Tomas Hozza - 12:4.3.1-8 - rebuild against bind-9.9.6