Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dockers/docker-dhcp-relay/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
FROM docker-config-engine-stretch
FROM docker-config-engine-buster

ARG docker_container_name
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
Expand Down
8 changes: 3 additions & 5 deletions rules/docker-dhcp-relay.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,18 @@ DOCKER_DHCP_RELAY_DBG = $(DOCKER_DHCP_RELAY_STEM)-$(DBG_IMAGE_MARK).gz
$(DOCKER_DHCP_RELAY)_PATH = $(DOCKERS_PATH)/$(DOCKER_DHCP_RELAY_STEM)

$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_RELAY) $(REDIS_TOOLS) $(SONIC_DHCPMON)
$(DOCKER_DHCP_RELAY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS)
$(DOCKER_DHCP_RELAY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS)
$(DOCKER_DHCP_RELAY)_DBG_DEPENDS += $(ISC_DHCP_RELAY_DBG)

$(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_IMAGE_PACKAGES)
$(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES)

$(DOCKER_DHCP_RELAY)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_STRETCH)
$(DOCKER_DHCP_RELAY)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BUSTER)

SONIC_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY)
SONIC_STRETCH_DOCKERS += $(DOCKER_DHCP_RELAY)

SONIC_DOCKER_DBG_IMAGES += $(DOCKER_DHCP_RELAY_DBG)
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_DHCP_RELAY_DBG)
SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_DHCP_RELAY_DBG)

$(DOCKER_DHCP_RELAY)_CONTAINER_NAME = dhcp_relay
$(DOCKER_DHCP_RELAY)_RUN_OPT += --privileged -t
Expand Down
99 changes: 99 additions & 0 deletions src/isc-dhcp/patch/0013-buster-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
diff --git a/includes/omapip/isclib.h b/includes/omapip/isclib.h
index caa388a..219d550 100644
--- a/includes/omapip/isclib.h
+++ b/includes/omapip/isclib.h
@@ -60,6 +60,8 @@
#include <isc/timer.h>
#include <isc/heap.h>
#include <isc/random.h>
+#include <isc/int.h>
+#include <isc/boolean.h>

#include <irs/resconf.h>

diff --git a/omapip/test.c b/omapip/test.c
index 98437ac..7215d9d 100644
--- a/omapip/test.c
+++ b/omapip/test.c
@@ -36,8 +36,8 @@
#include <string.h>
#include <omapip/result.h>
#include <sys/time.h>
-#include <omapip/omapip.h>
#include <omapip/isclib.h>
+#include <omapip/omapip.h>

int main (int argc, char **argv)
{
diff --git a/omapip/connection.c b/omapip/connection.c
index 9aac0c8..a74becc 100644
--- a/omapip/connection.c
+++ b/omapip/connection.c
@@ -30,6 +30,7 @@
#include "dhcpd.h"

#include <omapip/omapip_p.h>
+#include <isc/util.h>
#include <arpa/inet.h>
#include <arpa/nameser.h>
#include <errno.h>
diff --git a/common/execute.c b/common/execute.c
index fa4e0f8..1ee1e7d 100644
--- a/common/execute.c
+++ b/common/execute.c
@@ -28,6 +28,7 @@

#include "dhcpd.h"
#include <omapip/omapip_p.h>
+#include <isc/util.h>
#include <sys/types.h>
#include <sys/wait.h>

diff --git a/common/parse.c b/common/parse.c
index a358004..c348a50 100644
--- a/common/parse.c
+++ b/common/parse.c
@@ -27,6 +27,7 @@
*/

#include "dhcpd.h"
+#include <isc/util.h>
#include <syslog.h>

/* Enumerations can be specified in option formats, and are used for
diff --git a/common/socket.c b/common/socket.c
index d72f7ce..75d39a5 100644
--- a/common/socket.c
+++ b/common/socket.c
@@ -35,6 +35,7 @@
*/

#include "dhcpd.h"
+#include <isc/util.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <sys/uio.h>
diff --git a/client/dhclient.c b/client/dhclient.c
index f7486c6..6e89e57 100644
--- a/client/dhclient.c
+++ b/client/dhclient.c
@@ -38,6 +38,7 @@
#include <sys/wait.h>
#include <limits.h>
#include <isc/file.h>
+#include <isc/util.h>
#include <dns/result.h>

TIME default_lease_time = 43200; /* 12 hours... */
diff --git a/dhcpctl/dhcpctl.h b/dhcpctl/dhcpctl.h
index 0512bd4..51364c5 100644
--- a/dhcpctl/dhcpctl.h
+++ b/dhcpctl/dhcpctl.h
@@ -29,6 +29,7 @@
#ifndef _DHCPCTL_H_
#define _DHCPCTL_H_

+#include <omapip/isclib.h>
#include <omapip/omapip.h>

typedef isc_result_t dhcpctl_status;
1 change: 1 addition & 0 deletions src/isc-dhcp/patch/series
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
0010-CVE-2018-5732.patch
0008-interface-name-maxlen-crash.patch
0012-Don-t-skip-down-interfaces-when-discovering-interfac.patch
0013-buster-build.patch
Copy link
Copy Markdown
Contributor

@jleveque jleveque May 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than patching isc-dhcp source to forward-port 4.3.5-2 to Buster, I think it is better to upgrade the isc-dhcp source to the version available in buster (4.4.1-2). However, this may require more extensive rework of existing patches, and thus more extensive testing.

@lguohan: What is your opinion here? Should we do that here, or go with this approach temporarily and upgrade isc-dhcp in a future PR?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we did the same thing for snmp to upgrade to buster. @joyas-joseph, can you do the upgrade in this pr?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me take a look.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick update - of the 12 patches, only 3 (patches 1,6 and 12) applied cleanly.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any further update on this one?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The remaining 9 patches need to be manually reworked and also extensively tested. This is going to take time.

For SNMP case; since it was only a minor version update, we didnt have to rework any of the patches.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reworked the patches and pushed the changes.
I haven't tested option-82 though.

I would like @jleveque to look at the patches, especially the changes to common/discover.c