From: Adheer Chandravanshi <adheer.chandravan...@qlogic.com>

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.chandravan...@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudh...@qlogic.com>
---
 usr/iface.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

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.7.1

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to open-iscsi+unsubscr...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to