mirror of
https://abf.rosa.ru/djam/dhcp.git
synced 2025-02-23 21:42:48 +00:00
Delete old patches
This commit is contained in:
parent
61c033f663
commit
2761040c9c
5 changed files with 0 additions and 330 deletions
|
@ -1,39 +0,0 @@
|
||||||
diff -p -up dhcp-4.1.1/client/scripts/linux.prevent_wireless dhcp-4.1.1/client/scripts/linux
|
|
||||||
--- dhcp-4.1.1/client/scripts/linux.prevent_wireless 2010-02-25 11:37:31.000000000 -0300
|
|
||||||
+++ dhcp-4.1.1/client/scripts/linux 2010-02-25 11:37:37.000000000 -0300
|
|
||||||
@@ -13,6 +13,8 @@
|
|
||||||
|
|
||||||
# 1. ifconfig down apparently deletes all relevant routes and flushes
|
|
||||||
# the arp cache, so this doesn't need to be done explicitly.
|
|
||||||
+# 1.1. ifconfig $interface inet 0 is enough, and prevents unneeded
|
|
||||||
+# deassociation on wireless interfaces
|
|
||||||
|
|
||||||
# 2. The alias address handling here has not been tested AT ALL.
|
|
||||||
# I'm just going by the doc of modern Linux ip aliasing, which uses
|
|
||||||
@@ -170,7 +172,7 @@ if [ x$reason = xBOUND ] || [ x$reason =
|
|
||||||
if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
|
|
||||||
# IP address changed. Bringing down the interface will delete all routes,
|
|
||||||
# and clear the ARP cache.
|
|
||||||
- ifconfig $interface inet 0 down
|
|
||||||
+ ifconfig $interface inet 0
|
|
||||||
|
|
||||||
fi
|
|
||||||
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
|
|
||||||
@@ -224,7 +226,7 @@ if [ x$reason = xEXPIRE ] || [ x$reason
|
|
||||||
fi
|
|
||||||
if [ x$old_ip_address != x ]; then
|
|
||||||
# Shut down interface, which will delete routes and clear arp cache.
|
|
||||||
- ifconfig $interface inet 0 down
|
|
||||||
+ ifconfig $interface inet 0
|
|
||||||
fi
|
|
||||||
if [ x$alias_ip_address != x ]; then
|
|
||||||
ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
|
|
||||||
@@ -259,7 +261,7 @@ if [ x$reason = xTIMEOUT ]; then
|
|
||||||
fi
|
|
||||||
exit_with_hooks 0
|
|
||||||
fi
|
|
||||||
- ifconfig $interface inet 0 down
|
|
||||||
+ ifconfig $interface inet 0
|
|
||||||
exit_with_hooks 1
|
|
||||||
fi
|
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
diff -up dhcp-4.2.0/client/clparse.c.requested dhcp-4.2.0/client/clparse.c
|
|
||||||
--- dhcp-4.2.0/client/clparse.c.requested 2010-07-21 13:29:05.000000000 +0200
|
|
||||||
+++ dhcp-4.2.0/client/clparse.c 2010-07-21 13:50:29.000000000 +0200
|
|
||||||
@@ -37,7 +37,7 @@
|
|
||||||
|
|
||||||
struct client_config top_level_config;
|
|
||||||
|
|
||||||
-#define NUM_DEFAULT_REQUESTED_OPTS 9
|
|
||||||
+#define NUM_DEFAULT_REQUESTED_OPTS 14
|
|
||||||
struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1];
|
|
||||||
|
|
||||||
static void parse_client_default_duid(struct parse *cfile);
|
|
||||||
@@ -111,6 +111,31 @@ isc_result_t read_client_conf ()
|
|
||||||
option_code_hash_lookup(&default_requested_options[8],
|
|
||||||
dhcpv6_universe.code_hash, &code, 0, MDL);
|
|
||||||
|
|
||||||
+ /* 10 */
|
|
||||||
+ code = DHO_NIS_DOMAIN;
|
|
||||||
+ option_code_hash_lookup(&default_requested_options[9],
|
|
||||||
+ dhcp_universe.code_hash, &code, 0, MDL);
|
|
||||||
+
|
|
||||||
+ /* 11 */
|
|
||||||
+ code = DHO_NIS_SERVERS;
|
|
||||||
+ option_code_hash_lookup(&default_requested_options[10],
|
|
||||||
+ dhcp_universe.code_hash, &code, 0, MDL);
|
|
||||||
+
|
|
||||||
+ /* 12 */
|
|
||||||
+ code = DHO_NTP_SERVERS;
|
|
||||||
+ option_code_hash_lookup(&default_requested_options[11],
|
|
||||||
+ dhcp_universe.code_hash, &code, 0, MDL);
|
|
||||||
+
|
|
||||||
+ /* 13 */
|
|
||||||
+ code = DHO_INTERFACE_MTU;
|
|
||||||
+ option_code_hash_lookup(&default_requested_options[12],
|
|
||||||
+ dhcp_universe.code_hash, &code, 0, MDL);
|
|
||||||
+
|
|
||||||
+ /* 14 */
|
|
||||||
+ code = DHO_DOMAIN_SEARCH;
|
|
||||||
+ option_code_hash_lookup(&default_requested_options[13],
|
|
||||||
+ dhcp_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 "
|
|
|
@ -1,185 +0,0 @@
|
||||||
diff -Naur -x '*~' -x '*.orig' -x '*.rej' dhcp-4.2.2/client/scripts/linux dhcp-4.2.2-ifup/client/scripts/linux
|
|
||||||
--- dhcp-4.2.2/client/scripts/linux 2011-05-18 22:01:54.000000000 +0200
|
|
||||||
+++ dhcp-4.2.2-ifup/client/scripts/linux 2011-08-29 19:07:58.722894019 +0200
|
|
||||||
@@ -1,8 +1,11 @@
|
|
||||||
#!/bin/bash
|
|
||||||
-# dhclient-script for Linux. Dan Halbert, March, 1997.
|
|
||||||
-# Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
|
|
||||||
-# No guarantees about this. I'm a novice at the details of Linux
|
|
||||||
-# networking.
|
|
||||||
+# Network Interface Configuration System
|
|
||||||
+#
|
|
||||||
+# Based on:
|
|
||||||
+# dhclient-script for Linux. Dan Halbert, March, 1997.
|
|
||||||
+# Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
|
|
||||||
+# Modified for Mandriva Linux 1999-2009
|
|
||||||
+
|
|
||||||
|
|
||||||
# Notes:
|
|
||||||
|
|
||||||
@@ -26,28 +29,35 @@
|
|
||||||
ip=/sbin/ip
|
|
||||||
|
|
||||||
make_resolv_conf() {
|
|
||||||
+ local d
|
|
||||||
+ local ns
|
|
||||||
+
|
|
||||||
+ if [ -n "$DOMAIN" ]; then
|
|
||||||
+ d="search $DOMAIN"
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
if [ x"$new_domain_name_servers" != x ]; then
|
|
||||||
- cat /dev/null > /etc/resolv.conf.dhclient
|
|
||||||
- chmod 644 /etc/resolv.conf.dhclient
|
|
||||||
- if [ x"$new_domain_search" != x ]; then
|
|
||||||
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
|
|
||||||
+ if [ -n "$DOMAIN" ]; then
|
|
||||||
+ # already done above
|
|
||||||
+ d="search $DOMAIN"
|
|
||||||
+ elif [ x"$new_domain_search" != x ]; then
|
|
||||||
+ d="search $new_domain_search"
|
|
||||||
elif [ x"$new_domain_name" != x ]; then
|
|
||||||
# Note that the DHCP 'Domain Name Option' is really just a domain
|
|
||||||
# name, and that this practice of using the domain name option as
|
|
||||||
# a search path is both nonstandard and deprecated.
|
|
||||||
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
|
|
||||||
+ d="search $new_domain_name"
|
|
||||||
fi
|
|
||||||
for nameserver in $new_domain_name_servers; do
|
|
||||||
- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
|
|
||||||
+ ns="$ns"$'\n'"nameserver ${nameserver}"
|
|
||||||
done
|
|
||||||
|
|
||||||
- mv /etc/resolv.conf.dhclient /etc/resolv.conf
|
|
||||||
elif [ "x${new_dhcp6_name_servers}" != x ] ; then
|
|
||||||
- cat /dev/null > /etc/resolv.conf.dhclient6
|
|
||||||
- chmod 644 /etc/resolv.conf.dhclient6
|
|
||||||
-
|
|
||||||
- if [ "x${new_dhcp6_domain_search}" != x ] ; then
|
|
||||||
- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
|
|
||||||
+ if [ -n "$DOMAIN" ]; then
|
|
||||||
+ # already done above
|
|
||||||
+ d="search $DOMAIN"
|
|
||||||
+ elif [ "x${new_dhcp6_domain_search}" != x ] ; then
|
|
||||||
+ d="search ${new_dhcp6_domain_search}"
|
|
||||||
fi
|
|
||||||
shopt -s nocasematch
|
|
||||||
for nameserver in ${new_dhcp6_name_servers} ; do
|
|
||||||
@@ -59,11 +69,13 @@
|
|
||||||
else
|
|
||||||
zone_id=
|
|
||||||
fi
|
|
||||||
- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
|
|
||||||
+ ns="$ns"$'\n'"nameserver ${nameserver}$zone_id"
|
|
||||||
done
|
|
||||||
shopt -u nocasematch
|
|
||||||
+ fi
|
|
||||||
|
|
||||||
- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
|
|
||||||
+ if [ -n "$d" -o -n "$ns" ]; then
|
|
||||||
+ change_resolv_conf "$d" "$ns"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -88,6 +100,25 @@
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
+# Import Mandriva Linux configuration
|
|
||||||
+cd /etc/sysconfig/network-scripts;
|
|
||||||
+. /etc/sysconfig/network-scripts/network-functions
|
|
||||||
+. /etc/rc.d/init.d/functions
|
|
||||||
+
|
|
||||||
+[ -f ../network ] && . ../network
|
|
||||||
+[ -f ../networking/network ] && . ../networking/network
|
|
||||||
+
|
|
||||||
+CONFIG=$interface
|
|
||||||
+
|
|
||||||
+need_config ${CONFIG}
|
|
||||||
+
|
|
||||||
+if [ -f "${CONFIG}" ]; then
|
|
||||||
+ source_config
|
|
||||||
+else
|
|
||||||
+ echo $"$0: configuration for $interface not found." >&2
|
|
||||||
+ DEVICE=$interface
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
###
|
|
||||||
### DHCPv4 Handlers
|
|
||||||
###
|
|
||||||
@@ -138,15 +169,6 @@
|
|
||||||
|
|
||||||
if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
|
|
||||||
[ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
|
|
||||||
- current_hostname=`hostname`
|
|
||||||
- if [ x$current_hostname = x ] || \
|
|
||||||
- [ x$current_hostname = "x(none)" ] || \
|
|
||||||
- [ x$current_hostname = xlocalhost ] || \
|
|
||||||
- [ x$current_hostname = x$old_host_name ]; then
|
|
||||||
- if [ x$new_host_name != x$old_host_name ]; then
|
|
||||||
- hostname "$new_host_name"
|
|
||||||
- fi
|
|
||||||
- fi
|
|
||||||
|
|
||||||
if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
|
|
||||||
[ x$alias_ip_address != x$old_ip_address ]; then
|
|
||||||
@@ -165,12 +187,14 @@
|
|
||||||
ifconfig $interface inet $new_ip_address $new_subnet_arg \
|
|
||||||
$new_broadcast_arg $mtu_arg
|
|
||||||
# Add a network route to the computed network address.
|
|
||||||
+ if [ "${PEERGATEWAY}" != "no" ]; then
|
|
||||||
for router in $new_routers; do
|
|
||||||
if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
|
|
||||||
route add -host $router dev $interface
|
|
||||||
fi
|
|
||||||
route add default gw $router $metric_arg dev $interface
|
|
||||||
done
|
|
||||||
+ fi
|
|
||||||
else
|
|
||||||
# we haven't changed the address, have we changed other options
|
|
||||||
# that we wish to update?
|
|
||||||
@@ -193,7 +217,25 @@
|
|
||||||
ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
|
|
||||||
route add -host $alias_ip_address $interface:0
|
|
||||||
fi
|
|
||||||
- make_resolv_conf
|
|
||||||
+ if [ -n "$METRIC" ]; then
|
|
||||||
+ ifmetric $interface $METRIC
|
|
||||||
+ fi
|
|
||||||
+ if [ "${PEERDNS}" != "no" ]; then
|
|
||||||
+ make_resolv_conf
|
|
||||||
+ fi
|
|
||||||
+ if [ "${NEEDHOSTNAME}" = "yes" ]; then
|
|
||||||
+ if [ -z "$new_host_name" ]; then
|
|
||||||
+ eval `/bin/ipcalc --silent --hostname $new_ip_address`
|
|
||||||
+ new_host_name=$HOSTNAME
|
|
||||||
+ fi
|
|
||||||
+ if [ -n "$new_host_name" ]; then
|
|
||||||
+ current_hostname=`hostname`
|
|
||||||
+
|
|
||||||
+ if [ "$new_host_name" != "$current_hostname" ]; then
|
|
||||||
+ set_hostname $new_host_name
|
|
||||||
+ fi
|
|
||||||
+ fi
|
|
||||||
+ fi
|
|
||||||
exit_with_hooks 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
@@ -227,13 +269,17 @@
|
|
||||||
ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
|
|
||||||
route add -host $alias_ip_address dev $interface:0
|
|
||||||
fi
|
|
||||||
+ if [ "${PEERGATEWAY}" != "no" ]; then
|
|
||||||
for router in $new_routers; do
|
|
||||||
if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
|
|
||||||
route add -host $router dev $interface
|
|
||||||
fi
|
|
||||||
route add default gw $router $metric_arg dev $interface
|
|
||||||
done
|
|
||||||
+ fi
|
|
||||||
+ if [ "${PEERDNS}" != "no" ]; then
|
|
||||||
make_resolv_conf
|
|
||||||
+ fi
|
|
||||||
exit_with_hooks 0
|
|
||||||
fi
|
|
||||||
ifconfig $interface inet 0 down
|
|
|
@ -1,40 +0,0 @@
|
||||||
diff -Naur -x '*~' -x '*.rej' -x '*.orig' dhcp-4.2.2/common/discover.c dhcp-4.2.2-missing-ipv6-not-fatal/common/discover.c
|
|
||||||
--- dhcp-4.2.2/common/discover.c 2011-07-20 00:22:48.000000000 +0200
|
|
||||||
+++ dhcp-4.2.2-missing-ipv6-not-fatal/common/discover.c 2011-09-12 13:33:04.300509236 +0200
|
|
||||||
@@ -455,7 +455,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef DHCPv6
|
|
||||||
- if (local_family == AF_INET6) {
|
|
||||||
+ if ((local_family == AF_INET6) && !access("/proc/net/if_inet6", R_OK)) {
|
|
||||||
ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
|
|
||||||
if (ifaces->fp6 == NULL) {
|
|
||||||
log_error("Error opening '/proc/net/if_inet6' to "
|
|
||||||
@@ -466,6 +466,8 @@
|
|
||||||
ifaces->fp = NULL;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
+ } else {
|
|
||||||
+ ifaces->fp6 = NULL;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -733,7 +735,7 @@
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
#ifdef DHCPv6
|
|
||||||
- if (!(*err)) {
|
|
||||||
+ if (!(*err) && ifaces->fp6) {
|
|
||||||
if (local_family == AF_INET6)
|
|
||||||
return next_iface6(info, err, ifaces);
|
|
||||||
}
|
|
||||||
@@ -752,7 +754,8 @@
|
|
||||||
ifaces->sock = -1;
|
|
||||||
#ifdef DHCPv6
|
|
||||||
if (local_family == AF_INET6) {
|
|
||||||
- fclose(ifaces->fp6);
|
|
||||||
+ if (ifaces->fp6)
|
|
||||||
+ fclose(ifaces->fp6);
|
|
||||||
ifaces->fp6 = NULL;
|
|
||||||
}
|
|
||||||
#endif
|
|
|
@ -1,22 +0,0 @@
|
||||||
diff -Naur dhcp-4.2.5-P1/client/dhclient.conf.5 dhcp-4.2.5-P1.oden/client/dhclient.conf.5
|
|
||||||
--- dhcp-4.2.5-P1/client/dhclient.conf.5 2013-03-05 19:26:51.000000000 +0100
|
|
||||||
+++ dhcp-4.2.5-P1.oden/client/dhclient.conf.5 2013-03-28 11:55:37.131387053 +0100
|
|
||||||
@@ -202,7 +202,8 @@
|
|
||||||
options. Only the option names should be specified in the request
|
|
||||||
statement - not option parameters. By default, the DHCPv4 client
|
|
||||||
requests the subnet-mask, broadcast-address, time-offset, routers,
|
|
||||||
-domain-name, domain-name-servers and host-name options while the DHCPv6
|
|
||||||
+domain-search, domain-name, domain-name-servers, host-name, nis-domain,
|
|
||||||
+nis-servers, ntp-servers and interface-mtu options while the DHCPv6
|
|
||||||
client requests the dhcp6 name-servers and domain-search options. Note
|
|
||||||
that if you enter a \'request\' statement, you over-ride these defaults
|
|
||||||
and these options will not be requested.
|
|
||||||
@@ -713,7 +714,7 @@
|
|
||||||
supersede domain-search "fugue.com", "rc.vix.com", "home.vix.com";
|
|
||||||
prepend domain-name-servers 127.0.0.1;
|
|
||||||
request subnet-mask, broadcast-address, time-offset, routers,
|
|
||||||
- domain-name, domain-name-servers, host-name;
|
|
||||||
+ domain-search, domain-name, domain-name-servers, host-name;
|
|
||||||
require subnet-mask, domain-name-servers;
|
|
||||||
script "CLIENTBINDIR/dhclient-script";
|
|
||||||
media "media 10baseT/UTP", "media 10base2/BNC";
|
|
Loading…
Add table
Reference in a new issue