summaryrefslogtreecommitdiff
path: root/net-misc/dhcp/files/dhcp-4.3.6-dhclient-ntp.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-15 01:47:28 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-15 01:47:28 +0100
commitf208e35deefe1ee6fe6722cec9ad8cc12e92e638 (patch)
treef63456d14b948e3a902ace235a9961865728faaf /net-misc/dhcp/files/dhcp-4.3.6-dhclient-ntp.patch
parent4392d53af7ce45ccfe6eb14146479ef0e2bd790a (diff)
gentoo auto-resync : 15:10:2022 - 01:47:28
Diffstat (limited to 'net-misc/dhcp/files/dhcp-4.3.6-dhclient-ntp.patch')
-rw-r--r--net-misc/dhcp/files/dhcp-4.3.6-dhclient-ntp.patch210
1 files changed, 0 insertions, 210 deletions
diff --git a/net-misc/dhcp/files/dhcp-4.3.6-dhclient-ntp.patch b/net-misc/dhcp/files/dhcp-4.3.6-dhclient-ntp.patch
deleted file mode 100644
index a504840dd5ab..000000000000
--- a/net-misc/dhcp/files/dhcp-4.3.6-dhclient-ntp.patch
+++ /dev/null
@@ -1,210 +0,0 @@
---- dhcp-4.3.6/client/clparse.c
-+++ dhcp-4.3.6/client/clparse.c
-@@ -31,7 +31,7 @@
-
- struct client_config top_level_config;
-
--#define NUM_DEFAULT_REQUESTED_OPTS 9
-+#define NUM_DEFAULT_REQUESTED_OPTS 10
- /* There can be 2 extra requested options for DHCPv4-over-DHCPv6. */
- struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 2 + 1];
-
-@@ -107,15 +107,20 @@
- dhcp_universe.code_hash, &code, 0, MDL);
-
- /* 8 */
-- code = D6O_NAME_SERVERS;
-+ code = DHO_NTP_SERVERS;
- option_code_hash_lookup(&default_requested_options[7],
-- dhcpv6_universe.code_hash, &code, 0, MDL);
-+ dhcp_universe.code_hash, &code, 0, MDL);
-
- /* 9 */
-- code = D6O_DOMAIN_SEARCH;
-+ code = D6O_NAME_SERVERS;
- option_code_hash_lookup(&default_requested_options[8],
- dhcpv6_universe.code_hash, &code, 0, MDL);
-
-+ /* 10 */
-+ code = D6O_DOMAIN_SEARCH;
-+ option_code_hash_lookup(&default_requested_options[9],
-+ dhcpv6_universe.code_hash, &code, 0, MDL);
-+
- for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
- if (default_requested_options[code] == NULL)
- log_fatal("Unable to find option definition for "
---- dhcp-4.3.6/client/scripts/bsdos
-+++ dhcp-4.3.6/client/scripts/bsdos
-@@ -36,6 +36,26 @@
-
- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
- fi
-+ # If we're making confs, may as well make an ntp.conf too
-+ make_ntp_conf
-+}
-+
-+make_ntp_conf() {
-+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
-+ if [ x$new_ntp_servers != x ]; then
-+ conf="# Generated by dhclient for interface $interface\n"
-+ conf="${conf}restrict default noquery notrust nomodify\n"
-+ conf="${conf}restrict 127.0.0.1\n"
-+ for ntpserver in $new_ntp_servers; do
-+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
-+ conf="${conf}server $ntpserver\n"
-+ done
-+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
-+ conf="${conf}logfile /var/log/ntp.log\n"
-+ printf "${conf}" > /etc/ntp.conf
-+ chmod 644 /etc/ntp.conf
-+ fi
-+ fi
- }
-
- # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
---- dhcp-4.3.6/client/scripts/freebsd
-+++ dhcp-4.3.6/client/scripts/freebsd
-@@ -80,6 +80,26 @@
- fi
- fi
- fi
-+ # If we're making confs, may as well make an ntp.conf too
-+ make_ntp_conf
-+}
-+
-+make_ntp_conf() {
-+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
-+ if [ "x$new_ntp_servers" != x ]; then
-+ conf="# Generated by dhclient for interface $interface\n"
-+ conf="${conf}restrict default noquery notrust nomodify\n"
-+ conf="${conf}restrict 127.0.0.1\n"
-+ for ntpserver in $new_ntp_servers; do
-+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
-+ conf="${conf}server $ntpserver\n"
-+ done
-+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
-+ conf="${conf}logfile /var/log/ntp.log\n"
-+ printf "${conf}" > /etc/ntp.conf
-+ chmod 644 /etc/ntp.conf
-+ fi
-+ fi
- }
-
- # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
---- dhcp-4.3.6/client/scripts/linux
-+++ dhcp-4.3.6/client/scripts/linux
-@@ -106,6 +106,27 @@
- fi
- mv -f $new_resolv_conf /etc/resolv.conf
- fi
-+
-+ # If we're making confs, may as well make an ntp.conf too
-+ make_ntp_conf
-+}
-+
-+make_ntp_conf() {
-+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
-+ if [ "x$new_ntp_servers" != x ]; then
-+ conf="# Generated by dhclient for interface $interface\n"
-+ conf="${conf}restrict default noquery notrust nomodify\n"
-+ conf="${conf}restrict 127.0.0.1\n"
-+ for ntpserver in $new_ntp_servers; do
-+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
-+ conf="${conf}server $ntpserver\n"
-+ done
-+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
-+ conf="${conf}logfile /var/log/ntp.log\n"
-+ printf "${conf}" > /etc/ntp.conf
-+ chmod 644 /etc/ntp.conf
-+ fi
-+ fi
- }
-
- # set host name
---- dhcp-4.3.6/client/scripts/netbsd
-+++ dhcp-4.3.6/client/scripts/netbsd
-@@ -36,6 +36,26 @@
-
- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
- fi
-+ # If we're making confs, may as well make an ntp.conf too
-+ make_ntp_conf
-+}
-+
-+make_ntp_conf() {
-+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
-+ if [ "x$new_ntp_servers" != x ]; then
-+ conf="# Generated by dhclient for interface $interface\n"
-+ conf="${conf}restrict default noquery notrust nomodify\n"
-+ conf="${conf}restrict 127.0.0.1\n"
-+ for ntpserver in $new_ntp_servers; do
-+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
-+ conf="${conf}server $ntpserver\n"
-+ done
-+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
-+ conf="${conf}logfile /var/log/ntp.log\n"
-+ printf "${conf}" > /etc/ntp.conf
-+ chmod 644 /etc/ntp.conf
-+ fi
-+ fi
- }
-
- # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
---- dhcp-4.3.6/client/scripts/openbsd
-+++ dhcp-4.3.6/client/scripts/openbsd
-@@ -36,6 +36,26 @@
-
- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
- fi
-+ # If we're making confs, may as well make an ntp.conf too
-+ make_ntp_conf
-+}
-+
-+make_ntp_conf() {
-+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
-+ if [ "x$new_ntp_servers" != x ]; then
-+ conf="# Generated by dhclient for interface $interface\n"
-+ conf="${conf}restrict default noquery notrust nomodify\n"
-+ conf="${conf}restrict 127.0.0.1\n"
-+ for ntpserver in $new_ntp_servers; do
-+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
-+ conf="${conf}server $ntpserver\n"
-+ done
-+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
-+ conf="${conf}logfile /var/log/ntp.log\n"
-+ printf "${conf}" > /etc/ntp.conf
-+ chmod 644 /etc/ntp.conf
-+ fi
-+ fi
- }
-
- # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
---- dhcp-4.3.6/client/scripts/solaris
-+++ dhcp-4.3.6/client/scripts/solaris
-@@ -17,6 +17,26 @@
-
- mv /etc/resolv.conf.dhclient /etc/resolv.conf
- fi
-+ # If we're making confs, may as well make an ntp.conf too
-+ make_ntp_conf
-+}
-+
-+make_ntp_conf() {
-+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
-+ if [ "x$new_ntp_servers" != x ]; then
-+ conf="# Generated by dhclient for interface $interface\n"
-+ conf="${conf}restrict default noquery notrust nomodify\n"
-+ conf="${conf}restrict 127.0.0.1\n"
-+ for ntpserver in $new_ntp_servers; do
-+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
-+ conf="${conf}server $ntpserver\n"
-+ done
-+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
-+ conf="${conf}logfile /var/log/ntp.log\n"
-+ printf "${conf}" > /etc/ntp.conf
-+ chmod 644 /etc/ntp.conf
-+ fi
-+ fi
- }
-
- # Must be used on exit. Invokes the local dhcp client exit hooks, if any.