From 1583ea89319e2941e1e96145e3b99ae8749d4283 Mon Sep 17 00:00:00 2001 From: Chris Leech Date: Thu, 22 Jan 2015 09:56:18 -0800 Subject: [PATCH V2 2/2] fipvlan: segfault, return after vlan create in create_and_start_vlan --- fipvlan.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fipvlan.c b/fipvlan.c index 211da53..1feb41d 100644 --- a/fipvlan.c +++ b/fipvlan.c @@ -635,12 +635,12 @@ create_and_start_vlan(struct fcf *fcf, bool vn2vn) 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) { + 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); + else + printf("Created VLAN device %s\n", vlan_name); + return rc; } if (!config.start) return rc; -- 2.1.0