Re: [PATCH] Fix IPv6 discovery by stripping Zone ID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon,  4 Mar 2013 15:15:57 -0800
Lee Duncan <lduncan@xxxxxxxx> wrote:

> This strips off the "%ZONEID" that can be at the end of IPv6

'Can' means that possibly the string doesn't exist, right? The
following code works in such case?

> addresses returned by getnameinfo(). Without this, IPv6 discovery
> fails because the address has something like "%eth0" appended to it.
> 
> Signed of by: Lee Duncan <lduncan@xxxxxxxx>
> ---
>  usr/iscsi/iscsid.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c
> index 9614001..b10be1d 100644
> --- a/usr/iscsi/iscsid.c
> +++ b/usr/iscsi/iscsid.c
> @@ -871,6 +871,10 @@ static void text_scan_text(struct iscsi_connection *conn)
>  				continue;
>  			}
>  
> +			/* strip zone id */
> +			if (ss.ss_family == AF_INET6)
> +				(void) strsep(&p, "%");
> +
>  			p = buf + strlen(buf);
>  
>  			if (ss.ss_family == AF_INET6)
> -- 
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe stgt" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux