Patchwork [Open-FCoE] fcoeadm: --target segfault with other FC storage present

login
register
mail settings
Submitter Chris Leech
Date Oct. 21, 2016, 1:53 p.m.
Message ID <20161021135329.nihffg3zilsygcd6@straylight.hirudinean.org>
Download mbox | patch
Permalink /patch/365/
State New
Headers show

Comments

Chris Leech - Oct. 21, 2016, 1:53 p.m.
On Fri, Oct 21, 2016 at 03:23:20PM +0200, Johannes Thumshirn wrote:
> Anyways, thanks for the patch. I'll apply it and push to my github as I still
> don't have commit access to open-fcoe.org's git :-/.
> 
> While we're at it, do you guys have any foce-utils patches in the queue? I'd
> like to push out a new release soon (say after RHEL 7.3 and SLES12SP2 are out)?

Looks like I've only got one out of tree patch, dealing with the fact
that at some point a SAN MAC became required when it should be optional.

---

From: Chris Leech <cleech@redhat.com>
Date: Thu, 5 Feb 2015 11:46:31 -0800
Subject: [PATCH] sanmac isn't required

Signed-off-by: Chris Leech <cleech@redhat.com>
---
 lib/fip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Johannes Thumshirn - Oct. 21, 2016, 3:04 p.m.
On Fri, Oct 21, 2016 at 06:53:29AM -0700, Chris Leech wrote:
> On Fri, Oct 21, 2016 at 03:23:20PM +0200, Johannes Thumshirn wrote:
> > Anyways, thanks for the patch. I'll apply it and push to my github as I still
> > don't have commit access to open-fcoe.org's git :-/.
> > 
> > While we're at it, do you guys have any foce-utils patches in the queue? I'd
> > like to push out a new release soon (say after RHEL 7.3 and SLES12SP2 are out)?
> 
> Looks like I've only got one out of tree patch, dealing with the fact
> that at some point a SAN MAC became required when it should be optional.

I can queue that one up as well if you want. I'll also see what we're carrying
around with our distros.

Thanks,
	Johannes

> 
> ---
> 
> From: Chris Leech <cleech@redhat.com>
> Date: Thu, 5 Feb 2015 11:46:31 -0800
> Subject: [PATCH] sanmac isn't required
> 
> Signed-off-by: Chris Leech <cleech@redhat.com>
> ---
>  lib/fip.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/fip.c b/lib/fip.c
> index 6657b61..5e5b179 100644
> --- a/lib/fip.c
> +++ b/lib/fip.c
> @@ -215,7 +215,7 @@ int fip_socket(int ifindex, enum fip_multi multi)
>  		return s;
>  
>  	rc = fip_socket_sanmac(s, ifindex, 1);
> -	if (rc < 0) {
> +	if (rc < 0 && rc != -ENXIO) {
>  		close(s);
>  		return rc;
>  	}
> -- 
> 2.1.0
>
Johannes Thumshirn - Oct. 23, 2016, 2:44 p.m.
On Fri, Oct 21, 2016 at 06:53:29AM -0700, Chris Leech wrote:
> On Fri, Oct 21, 2016 at 03:23:20PM +0200, Johannes Thumshirn wrote:
> > Anyways, thanks for the patch. I'll apply it and push to my github as I still
> > don't have commit access to open-fcoe.org's git :-/.
> > 
> > While we're at it, do you guys have any foce-utils patches in the queue? I'd
> > like to push out a new release soon (say after RHEL 7.3 and SLES12SP2 are out)?
> 
> Looks like I've only got one out of tree patch, dealing with the fact
> that at some point a SAN MAC became required when it should be optional.

Both patches applied and pushed out to:
git@github.com:morbidrsa/fcoe-utils.git


Thanks,
	Johannes

Patch

diff --git a/lib/fip.c b/lib/fip.c
index 6657b61..5e5b179 100644
--- a/lib/fip.c
+++ b/lib/fip.c
@@ -215,7 +215,7 @@  int fip_socket(int ifindex, enum fip_multi multi)
 		return s;
 
 	rc = fip_socket_sanmac(s, ifindex, 1);
-	if (rc < 0) {
+	if (rc < 0 && rc != -ENXIO) {
 		close(s);
 		return rc;
 	}