34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
|
From 75ee9d0af6e200b34e84b1e7b37971213b2fd629 Mon Sep 17 00:00:00 2001
|
||
|
From: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
|
||
|
Date: Fri, 18 Oct 2013 09:29:26 -0400
|
||
|
Subject: [PATCH] iscsi tools: Let default type of iface be ipv4
|
||
|
|
||
|
While using iface name to determine its type if the name does not
|
||
|
contain iface type then assume it be to of type ipv4 by default.
|
||
|
|
||
|
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
|
||
|
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
|
||
|
---
|
||
|
usr/iface.c | 4 +++-
|
||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/usr/iface.c b/usr/iface.c
|
||
|
index 87ac875..870dba0 100644
|
||
|
--- a/usr/iface.c
|
||
|
+++ b/usr/iface.c
|
||
|
@@ -450,8 +450,10 @@ int iface_get_iptype(struct iface_rec *iface)
|
||
|
/* try to figure out by name */
|
||
|
if (strstr(iface->name, "ipv4"))
|
||
|
return ISCSI_IFACE_TYPE_IPV4;
|
||
|
- else
|
||
|
+ else if (strstr(iface->name, "ipv6"))
|
||
|
return ISCSI_IFACE_TYPE_IPV6;
|
||
|
+ else /* assume ipv4 by default */
|
||
|
+ return ISCSI_IFACE_TYPE_IPV4;
|
||
|
} else {
|
||
|
if (strcmp(iface->bootproto, "dhcp") &&
|
||
|
!strstr(iface->ipaddress, "."))
|
||
|
--
|
||
|
1.8.3.1
|
||
|
|