From: Adheer Chandravanshi <>

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 <>
Signed-off-by: Vikas Chaudhary <>
 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, "."))

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 post to this group, send email to
Visit this group at
For more options, visit

Reply via email to