An example per-interface configuration file is created on install, the file name is cfg-ethx. Currenly fcoemon treats "ethx" as a valid interface name. We should skip this file when we're parsing through the configuration files.
The only bad behavior that this is causing without this patch is that we will write "ethx" to /sys/module/fcoe/parameters/create when stopping the fcoe service. Signed-off-by: Robert Love <[email protected]> --- fcoemon.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/fcoemon.c b/fcoemon.c index f147041..87a6fc1 100644 --- a/fcoemon.c +++ b/fcoemon.c @@ -66,6 +66,7 @@ #define DCB_APP_0_DEFAULT_WILLING 1 #define FILE_NAME_LEN (NAME_MAX + 1) #define CFG_FILE_PREFIX "cfg-" +#define DEF_CFG_FILE CFG_FILE_PREFIX "ethx" #define VLAN_DIR "/proc/net/vlan" @@ -306,6 +307,11 @@ static int fcm_read_config_files(void) strlen(CFG_FILE_PREFIX)); if (rc) continue; + + if (!strncmp(dp->d_name, DEF_CFG_FILE, + strlen(DEF_CFG_FILE))) + continue; + next = alloc_fcoe_port(dp->d_name + 4); if (!next) { _______________________________________________ devel mailing list [email protected] http://www.open-fcoe.org/mailman/listinfo/devel
