From 5047552f3a49c30680e2ef61445998256845e1a7 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Wed, 20 Dec 2017 00:03:36 +0000 Subject: [PATCH 1/2] [DHCP relay]: Add patch to prevent dropping VLAN-tagged packets --- ...1-Do-not-discard-VLAN-tagged-packets.patch | 27 +++++++++++++++++++ ...on-82-circuit-ID-and-remote-ID-fiel.patch} | 4 +-- ...ning-name-of-physical-interface-tha.patch} | 4 +-- ...ng-port-alias-map-file-to-replace-p.patch} | 4 +-- src/isc-dhcp/patch/series | 7 ++--- 5 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 src/isc-dhcp/patch/0001-Do-not-discard-VLAN-tagged-packets.patch rename src/isc-dhcp/patch/{0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch => 0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch} (98%) rename src/isc-dhcp/patch/{0002-Support-for-obtaining-name-of-physical-interface-tha.patch => 0003-Support-for-obtaining-name-of-physical-interface-tha.patch} (96%) rename src/isc-dhcp/patch/{0003-Support-for-loading-port-alias-map-file-to-replace-p.patch => 0004-Support-for-loading-port-alias-map-file-to-replace-p.patch} (98%) diff --git a/src/isc-dhcp/patch/0001-Do-not-discard-VLAN-tagged-packets.patch b/src/isc-dhcp/patch/0001-Do-not-discard-VLAN-tagged-packets.patch new file mode 100644 index 000000000000..bac44f7e0400 --- /dev/null +++ b/src/isc-dhcp/patch/0001-Do-not-discard-VLAN-tagged-packets.patch @@ -0,0 +1,27 @@ +From d2c7ec53c6e4360183d593dd886b68bf30ec4f5d Mon Sep 17 00:00:00 2001 +From: Joe LeVeque +Date: Tue, 19 Dec 2017 23:58:37 +0000 +Subject: [PATCH 1/4] Do not discard VLAN-tagged packets + +--- + common/lpf.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/common/lpf.c b/common/lpf.c +index 7889b6b..3789d54 100644 +--- a/common/lpf.c ++++ b/common/lpf.c +@@ -425,8 +425,8 @@ ssize_t receive_packet (interface, buf, len, from, hfrom) + /* Discard packets with stripped vlan id */ + + #ifdef VLAN_TCI_PRESENT +- if (aux->tp_vlan_tci != 0) +- return 0; ++ //if (aux->tp_vlan_tci != 0) ++ // return 0; + #endif + + csum_ready = ((aux->tp_status & TP_STATUS_CSUMNOTREADY) +-- +2.1.4 + diff --git a/src/isc-dhcp/patch/0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch b/src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch similarity index 98% rename from src/isc-dhcp/patch/0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch rename to src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch index 22a8f7faedd1..e2deebfcfe59 100644 --- a/src/isc-dhcp/patch/0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch +++ b/src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch @@ -1,7 +1,7 @@ -From 284c87ff4b3873d0215904273fe3c86b07b4ba94 Mon Sep 17 00:00:00 2001 +From 248342f92727fc66511ceb2f7269bc286fe5bffe Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Mon, 11 Dec 2017 23:21:08 +0000 -Subject: [PATCH 1/3] Customizable Option 82 circuit ID and remote ID fields +Subject: [PATCH 2/4] Customizable Option 82 circuit ID and remote ID fields --- relay/dhcrelay.c | 182 ++++++++++++++++++++++++++++++++++++++++++++++--------- diff --git a/src/isc-dhcp/patch/0002-Support-for-obtaining-name-of-physical-interface-tha.patch b/src/isc-dhcp/patch/0003-Support-for-obtaining-name-of-physical-interface-tha.patch similarity index 96% rename from src/isc-dhcp/patch/0002-Support-for-obtaining-name-of-physical-interface-tha.patch rename to src/isc-dhcp/patch/0003-Support-for-obtaining-name-of-physical-interface-tha.patch index ee85a7736287..2696af9f5cf0 100644 --- a/src/isc-dhcp/patch/0002-Support-for-obtaining-name-of-physical-interface-tha.patch +++ b/src/isc-dhcp/patch/0003-Support-for-obtaining-name-of-physical-interface-tha.patch @@ -1,7 +1,7 @@ -From caad3e05c31c9fad8cda378ce95a1969def771a2 Mon Sep 17 00:00:00 2001 +From 4926868978a7052f0b45daaee706bc3476a1d204 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Mon, 11 Dec 2017 23:39:10 +0000 -Subject: [PATCH 2/3] Support for obtaining name of physical interface that is +Subject: [PATCH 3/4] Support for obtaining name of physical interface that is a member of a bridge interface --- diff --git a/src/isc-dhcp/patch/0003-Support-for-loading-port-alias-map-file-to-replace-p.patch b/src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch similarity index 98% rename from src/isc-dhcp/patch/0003-Support-for-loading-port-alias-map-file-to-replace-p.patch rename to src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch index 7411e1c4ff3e..c4835b13efd9 100644 --- a/src/isc-dhcp/patch/0003-Support-for-loading-port-alias-map-file-to-replace-p.patch +++ b/src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch @@ -1,7 +1,7 @@ -From 3a42b497716375c9347b51c3a28c5e91e7cd4cf4 Mon Sep 17 00:00:00 2001 +From ba94b49abe5f439ea2ef4687b7fd58f590fd0f32 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Tue, 12 Dec 2017 00:49:09 +0000 -Subject: [PATCH 3/3] Support for loading port alias map file to replace port +Subject: [PATCH 4/4] Support for loading port alias map file to replace port name with alias in circuit id --- diff --git a/src/isc-dhcp/patch/series b/src/isc-dhcp/patch/series index a896563077c2..f0a58294770b 100644 --- a/src/isc-dhcp/patch/series +++ b/src/isc-dhcp/patch/series @@ -1,4 +1,5 @@ # This series applies on GIT commit ee3dffdda38a8cfc6ad2005d8d64a165d2a709ba -0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch -0002-Support-for-obtaining-name-of-physical-interface-tha.patch -0003-Support-for-loading-port-alias-map-file-to-replace-p.patch +0001-Do-not-discard-VLAN-tagged-packets.patch +0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch +0003-Support-for-obtaining-name-of-physical-interface-tha.patch +0004-Support-for-loading-port-alias-map-file-to-replace-p.patch From 0426023a1466567f1d1aaee16d25ad5570f53d97 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Wed, 20 Dec 2017 02:20:20 +0000 Subject: [PATCH 2/2] Always undef VLAN_TCI_PRESENT so as not to treat VLAN-tagged packets differently --- ...N_TCI_PRESENT-so-as-not-to-treat-VLA.patch | 30 +++++++++++++++++++ ...1-Do-not-discard-VLAN-tagged-packets.patch | 27 ----------------- ...ion-82-circuit-ID-and-remote-ID-fiel.patch | 2 +- ...ining-name-of-physical-interface-tha.patch | 2 +- ...ing-port-alias-map-file-to-replace-p.patch | 2 +- src/isc-dhcp/patch/series | 2 +- 6 files changed, 34 insertions(+), 31 deletions(-) create mode 100644 src/isc-dhcp/patch/0001-Always-undef-VLAN_TCI_PRESENT-so-as-not-to-treat-VLA.patch delete mode 100644 src/isc-dhcp/patch/0001-Do-not-discard-VLAN-tagged-packets.patch diff --git a/src/isc-dhcp/patch/0001-Always-undef-VLAN_TCI_PRESENT-so-as-not-to-treat-VLA.patch b/src/isc-dhcp/patch/0001-Always-undef-VLAN_TCI_PRESENT-so-as-not-to-treat-VLA.patch new file mode 100644 index 000000000000..f5afc5692a5d --- /dev/null +++ b/src/isc-dhcp/patch/0001-Always-undef-VLAN_TCI_PRESENT-so-as-not-to-treat-VLA.patch @@ -0,0 +1,30 @@ +From 7fe46584c3d9cb6b1ecdee47ff5ac2b777f96ec6 Mon Sep 17 00:00:00 2001 +From: Joe LeVeque +Date: Wed, 20 Dec 2017 02:18:10 +0000 +Subject: [PATCH 1/4] Always undef VLAN_TCI_PRESENT so as not to treat + VLAN-tagged packets differently + +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 3f1415b..fcfeba0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -600,9 +600,9 @@ AC_CHECK_MEMBER(struct msghdr.msg_control,, + #include + ]) + +-AC_CHECK_MEMBER(struct tpacket_auxdata.tp_vlan_tci, +- [AC_DEFINE([VLAN_TCI_PRESENT], [1], [tpacket_auxdata.tp_vlan_tci present])] +- ,, [#include ]) ++#AC_CHECK_MEMBER(struct tpacket_auxdata.tp_vlan_tci, ++# [AC_DEFINE([VLAN_TCI_PRESENT], [1], [tpacket_auxdata.tp_vlan_tci present])] ++# ,, [#include ]) + + libbind= + AC_ARG_WITH(libbind, +-- +2.1.4 + diff --git a/src/isc-dhcp/patch/0001-Do-not-discard-VLAN-tagged-packets.patch b/src/isc-dhcp/patch/0001-Do-not-discard-VLAN-tagged-packets.patch deleted file mode 100644 index bac44f7e0400..000000000000 --- a/src/isc-dhcp/patch/0001-Do-not-discard-VLAN-tagged-packets.patch +++ /dev/null @@ -1,27 +0,0 @@ -From d2c7ec53c6e4360183d593dd886b68bf30ec4f5d Mon Sep 17 00:00:00 2001 -From: Joe LeVeque -Date: Tue, 19 Dec 2017 23:58:37 +0000 -Subject: [PATCH 1/4] Do not discard VLAN-tagged packets - ---- - common/lpf.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/common/lpf.c b/common/lpf.c -index 7889b6b..3789d54 100644 ---- a/common/lpf.c -+++ b/common/lpf.c -@@ -425,8 +425,8 @@ ssize_t receive_packet (interface, buf, len, from, hfrom) - /* Discard packets with stripped vlan id */ - - #ifdef VLAN_TCI_PRESENT -- if (aux->tp_vlan_tci != 0) -- return 0; -+ //if (aux->tp_vlan_tci != 0) -+ // return 0; - #endif - - csum_ready = ((aux->tp_status & TP_STATUS_CSUMNOTREADY) --- -2.1.4 - diff --git a/src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch b/src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch index e2deebfcfe59..33197a80b0e0 100644 --- a/src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch +++ b/src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch @@ -1,4 +1,4 @@ -From 248342f92727fc66511ceb2f7269bc286fe5bffe Mon Sep 17 00:00:00 2001 +From c2361e2bf24408cc21a4691c3897cc64c95372f1 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Mon, 11 Dec 2017 23:21:08 +0000 Subject: [PATCH 2/4] Customizable Option 82 circuit ID and remote ID fields diff --git a/src/isc-dhcp/patch/0003-Support-for-obtaining-name-of-physical-interface-tha.patch b/src/isc-dhcp/patch/0003-Support-for-obtaining-name-of-physical-interface-tha.patch index 2696af9f5cf0..7d9169dc67af 100644 --- a/src/isc-dhcp/patch/0003-Support-for-obtaining-name-of-physical-interface-tha.patch +++ b/src/isc-dhcp/patch/0003-Support-for-obtaining-name-of-physical-interface-tha.patch @@ -1,4 +1,4 @@ -From 4926868978a7052f0b45daaee706bc3476a1d204 Mon Sep 17 00:00:00 2001 +From 236d4f1cb0afa2bee22f47a48b725427bfcb5a9c Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Mon, 11 Dec 2017 23:39:10 +0000 Subject: [PATCH 3/4] Support for obtaining name of physical interface that is diff --git a/src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch b/src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch index c4835b13efd9..1d42e9838f96 100644 --- a/src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch +++ b/src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch @@ -1,4 +1,4 @@ -From ba94b49abe5f439ea2ef4687b7fd58f590fd0f32 Mon Sep 17 00:00:00 2001 +From 1092578a8415b9d49182c2b9825753e96481246a Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Tue, 12 Dec 2017 00:49:09 +0000 Subject: [PATCH 4/4] Support for loading port alias map file to replace port diff --git a/src/isc-dhcp/patch/series b/src/isc-dhcp/patch/series index f0a58294770b..980b9b97e34b 100644 --- a/src/isc-dhcp/patch/series +++ b/src/isc-dhcp/patch/series @@ -1,5 +1,5 @@ # This series applies on GIT commit ee3dffdda38a8cfc6ad2005d8d64a165d2a709ba -0001-Do-not-discard-VLAN-tagged-packets.patch +0001-Always-undef-VLAN_TCI_PRESENT-so-as-not-to-treat-VLA.patch 0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch 0003-Support-for-obtaining-name-of-physical-interface-tha.patch 0004-Support-for-loading-port-alias-map-file-to-replace-p.patch