045f8440d4
- Start fcoemon in foreground from service file (bnc#873269) * Add 0030-fcoe.service-Add-foreground-to-prevent-fcoemon-to-be.patch - Fixup IEEE state machine * Add 0031-fcoemon-Fix-IEEE-state-machine.patch - Fix fipvlan crash during booting (bnc#877275): * Add 0032-fipvlan-Fix-crash-in-create_and_start_vlan.patch * Add 0033-fipvlan-suppress-warning-interface-already-exists.patch * Add 0034-fipvlan-do-not-crash-on-empty-MAC-address-in-lookup_.patch - Fixup warning messages during booting: * Add 0035-fipvlan-fixup-return-value-on-error.patch * Add 0036-fipvlan-clean-up-state-machine-for-pfd_add.patch - Remove obsolete file fcoe.config from sources OBS-URL: https://build.opensuse.org/request/show/234122 OBS-URL: https://build.opensuse.org/package/show/network:fcoe/fcoe-utils?expand=0&rev=18
59 lines
1.8 KiB
Diff
59 lines
1.8 KiB
Diff
From 0d006642c34e360fb7d3c3adbbb1295e784c03bf Mon Sep 17 00:00:00 2001
|
|
From: Hannes Reinecke <hare@suse.de>
|
|
Date: Mon, 12 May 2014 14:55:50 +0200
|
|
Subject: fipvlan: Fix crash in create_and_start_vlan()
|
|
|
|
create_and_start_vlan() will issue a netlink command to create
|
|
a new VLAN device. As this device isn't present yet we need
|
|
to exit here and retry the vlan configuration once we get the
|
|
appropriate message from netlink.
|
|
|
|
References: bnc#877275
|
|
|
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
|
---
|
|
fipvlan.c | 25 +++++++++++++------------
|
|
1 file changed, 13 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/fipvlan.c b/fipvlan.c
|
|
index cc71412..7202f03 100644
|
|
--- a/fipvlan.c
|
|
+++ b/fipvlan.c
|
|
@@ -626,20 +626,21 @@ create_and_start_vlan(struct fcf *fcf, bool vn2vn)
|
|
vlan = real_dev;
|
|
} else {
|
|
vlan = lookup_vlan(fcf->ifindex, fcf->vlan);
|
|
- if (vlan) {
|
|
- FIP_LOG_DBG("VLAN %s.%d already exists as %s\n",
|
|
- real_dev->ifname, fcf->vlan, vlan->ifname);
|
|
+ if (!vlan) {
|
|
+ snprintf(vlan_name, IFNAMSIZ, "%s.%d%s",
|
|
+ real_dev->ifname, fcf->vlan, config.suffix);
|
|
+ rc = vlan_create(fcf->ifindex, fcf->vlan, vlan_name);
|
|
+ if (rc < 0) {
|
|
+ printf("Failed to create VLAN device %s\n"
|
|
+ "\t%s\n",
|
|
+ vlan_name, strerror(-rc));
|
|
+ return rc;
|
|
+ }
|
|
+ printf("Created VLAN device %s\n", vlan_name);
|
|
return 0;
|
|
}
|
|
- snprintf(vlan_name, IFNAMSIZ, "%s.%d%s",
|
|
- real_dev->ifname, fcf->vlan, config.suffix);
|
|
- rc = vlan_create(fcf->ifindex, fcf->vlan, vlan_name);
|
|
- if (rc < 0) {
|
|
- printf("Failed to create VLAN device %s\n\t%s\n",
|
|
- vlan_name, strerror(-rc));
|
|
- return rc;
|
|
- }
|
|
- printf("Created VLAN device %s\n", vlan_name);
|
|
+ FIP_LOG_DBG("VLAN %s.%d already exists as %s\n",
|
|
+ real_dev->ifname, fcf->vlan, vlan->ifname);
|
|
}
|
|
if (!config.start)
|
|
return rc;
|
|
--
|
|
1.7.12.4
|
|
|