- Fixed dhclient to check pre-init results reported by dhclient-script
and fail if pre-init fails for a requested interface (bsc#912098) Adjusted dhclient-script to fail also if NetworkManager is enabled, as it is using an own script and a second client causes conflicts. [+ 0018-client-fail-on-script-pre-init-error-bsc-912098.patch] OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=156
This commit is contained in:
parent
d11e18a5a5
commit
7aa1b98105
50
0018-client-fail-on-script-pre-init-error-bsc-912098.patch
Normal file
50
0018-client-fail-on-script-pre-init-error-bsc-912098.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From 937561ef8c09e3281caba3c859e80ce2fcf23ce4 Mon Sep 17 00:00:00 2001
|
||||
From: Marius Tomaschewski <mt@suse.de>
|
||||
Date: Mon, 14 Sep 2015 18:53:34 +0200
|
||||
Subject: [PATCH] client: fail on script pre-init error (bsc#912098)
|
||||
References: bsc#912098
|
||||
|
||||
diff --git a/client/dhclient.c b/client/dhclient.c
|
||||
index b438629..82d6ed5 100644
|
||||
--- a/client/dhclient.c
|
||||
+++ b/client/dhclient.c
|
||||
@@ -632,7 +632,8 @@ main(int argc, char **argv) {
|
||||
* in case somebody cares.
|
||||
*/
|
||||
script_init(NULL, "NBI", NULL);
|
||||
- script_go(NULL);
|
||||
+ if (script_go(NULL))
|
||||
+ log_fatal("dhclient-script was unable to pre-init");
|
||||
|
||||
/*
|
||||
* If we haven't been asked to persist, waiting for new
|
||||
@@ -644,6 +645,8 @@ main(int argc, char **argv) {
|
||||
exit(0);
|
||||
}
|
||||
} else if (!release_mode && !exit_mode) {
|
||||
+ unsigned int failed = 0;
|
||||
+
|
||||
/* Call the script with the list of interfaces. */
|
||||
for (ip = interfaces; ip; ip = ip->next) {
|
||||
/*
|
||||
@@ -665,7 +668,16 @@ main(int argc, char **argv) {
|
||||
"alias_",
|
||||
ip->client->alias);
|
||||
}
|
||||
- script_go(ip->client);
|
||||
+ if (script_go(ip->client)) {
|
||||
+ log_info("%s: unable to request interface %s",
|
||||
+ path_dhclient_script, ip->name);
|
||||
+ ip->flags &= ~(INTERFACE_REQUESTED|INTERFACE_AUTOMATIC);
|
||||
+ failed++;
|
||||
+ }
|
||||
+ }
|
||||
+ if (failed) {
|
||||
+ log_fatal("%s: unable to pre-init requested interfaces",
|
||||
+ path_dhclient_script);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.1.4
|
||||
|
@ -77,7 +77,7 @@ network_service_conflicts()
|
||||
wicked.service) return 1 ;;
|
||||
|
||||
# NetworkManager is using another script
|
||||
#NetworkManager.service) return 1 ;;
|
||||
NetworkManager.service) return 1 ;;
|
||||
|
||||
# sysconfig network were using it, other?
|
||||
network.service|*) return 0 ;;
|
||||
|
@ -52,6 +52,11 @@ Mon Sep 14 14:39:34 UTC 2015 - mt@suse.de
|
||||
with the files shipped by bind-devel package, which is not
|
||||
source and binary compatible (bsc#910686).
|
||||
- Corrected changes to provide complete patch file references.
|
||||
- Fixed dhclient to check pre-init results reported by dhclient-script
|
||||
and fail if pre-init fails for a requested interface (bsc#912098)
|
||||
Adjusted dhclient-script to fail also if NetworkManager is enabled,
|
||||
as it is using an own script and a second client causes conflicts.
|
||||
[+ 0018-client-fail-on-script-pre-init-error-bsc-912098.patch]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 3 18:37:59 UTC 2015 - coolo@suse.com
|
||||
|
@ -114,6 +114,8 @@ Patch15: 0015-Expose-next-server-DHCPv4-option-to-dhclient-script.patch
|
||||
Patch16: 0016-infiniband-support.patch
|
||||
# PATCH-FIX-SLE server-no-success-report-before-send bsc#919959
|
||||
Patch17: 0017-server-no-success-report-before-send.919959.patch
|
||||
# PATCH-FIX-SLE client-fail-on-script-pre-init-error (bsc#912098)
|
||||
Patch18: 0018-client-fail-on-script-pre-init-error-bsc-912098.patch
|
||||
##
|
||||
PreReq: /bin/touch /sbin/chkconfig sysconfig
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -243,6 +245,7 @@ Authors:
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
##
|
||||
find . -type f -name \*.cat\* -exec rm -f {} \;
|
||||
dos2unix contrib/ms2isc/*
|
||||
|
Loading…
Reference in New Issue
Block a user