diff --git a/base/dhcp/debian/deb_patches/0003-Use-prefixlen-for-IPv6-address-operations.patch b/base/dhcp/debian/deb_patches/0003-Use-prefixlen-for-IPv6-address-operations.patch new file mode 100644 index 000000000..d45784194 --- /dev/null +++ b/base/dhcp/debian/deb_patches/0003-Use-prefixlen-for-IPv6-address-operations.patch @@ -0,0 +1,40 @@ +From 42a0e83df41494cc67157f98b18a4087f6853911 Mon Sep 17 00:00:00 2001 +From: Andre Fernando Zanella Kantek + +Date: Thu, 1 Sep 2022 10:05:09 -0300 +Subject: [PATCH] Use prefixlen for IPv6 address operations + +use the prefix length variable available to the script to correctly +set the address passed by the dhclient program. + + +Signed-off-by: Andre Fernando Zanella Kantek +--- + debian/dhclient-script.linux | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/debian/dhclient-script.linux b/debian/dhclient-script.linux +index 8b29988..915cc13 100644 +--- a/debian/dhclient-script.linux ++++ b/debian/dhclient-script.linux +@@ -403,7 +403,7 @@ case "$reason" in + + if [ "${new_ip6_address}" ]; then + # set leased IP +- ip -6 addr add ${new_ip6_address} \ ++ ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \ + dev ${interface} scope global + fi + +@@ -429,7 +429,7 @@ case "$reason" in + fi + + # delete leased IP +- ip -6 addr del ${old_ip6_address} \ ++ ip -6 addr del ${old_ip6_address}/${old_ip6_prefixlen} \ + dev ${interface} + + ;; +-- +2.17.1 + diff --git a/base/dhcp/debian/deb_patches/series b/base/dhcp/debian/deb_patches/series index c42669b16..b32eda96f 100644 --- a/base/dhcp/debian/deb_patches/series +++ b/base/dhcp/debian/deb_patches/series @@ -1,2 +1,3 @@ 0001-dhclient-dhcp6-set-hostname.patch 0002-Update-dn-and-dns-only-with-diff-upon-RENEW.patch +0003-Use-prefixlen-for-IPv6-address-operations.patch \ No newline at end of file diff --git a/base/dhcp/debian/patches/dhclient-set-the-default-prefix-length-to-64.patch b/base/dhcp/debian/patches/dhclient-set-the-default-prefix-length-to-64.patch new file mode 100644 index 000000000..0eff48716 --- /dev/null +++ b/base/dhcp/debian/patches/dhclient-set-the-default-prefix-length-to-64.patch @@ -0,0 +1,33 @@ +From 45595a9851a6e09d17a6fc9006b7ddb3b8539756 Mon Sep 17 00:00:00 2001 +From: Andre Fernando Zanella Kantek + +Date: Thu, 1 Sep 2022 10:26:19 -0300 +Subject: [PATCH] Set the default prefix length to 64 + +Since the StarlingX internode communication happens without a L3 router, +the hosts will not be able to see each other with prefix length of 128. + +This commit sets the default value to 64 + + +Signed-off-by: Andre Fernando Zanella Kantek +--- + includes/site.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/includes/site.h b/includes/site.h +index 2ef69e4..ca2ec6a 100644 +--- a/includes/site.h ++++ b/includes/site.h +@@ -285,7 +285,7 @@ + is a host address and doesn't include any on-link information. + 64 indicates that the first 64 bits are the subnet or on-link + prefix. */ +-#define DHCLIENT_DEFAULT_PREFIX_LEN 128 ++#define DHCLIENT_DEFAULT_PREFIX_LEN 64 + + /* Enable the gentle shutdown signal handling. Currently this + means that on SIGINT or SIGTERM a client will release its +-- +2.17.1 + diff --git a/base/dhcp/debian/patches/series b/base/dhcp/debian/patches/series index 925b05973..a997a285b 100644 --- a/base/dhcp/debian/patches/series +++ b/base/dhcp/debian/patches/series @@ -1,3 +1,4 @@ dhclient-restrict-interfaces-to-command-line.patch dhclient-ipv6-bind-to-interface.patch dhclient-ipv6-conditionally-set-hostname.patch +dhclient-set-the-default-prefix-length-to-64.patch \ No newline at end of file