Blob Blame History Raw
From d295d0745829f9eee1f4f0e1e3328f9bb4f2dc16 Mon Sep 17 00:00:00 2001
From: Manish Rangankar <manish.rangankar@cavium.com>
Date: Wed, 20 Jun 2018 16:19:24 +0530
Subject: [PATCH 1/1] iscsid: Update boot gateway information during
 sync_session.

During boot for SAN scenario after switch root iscsid not
passing gateway information to iscsiuio.

Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
---
 usr/iscsi_sysfs.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c
index fdc26c7..8e89b30 100644
--- a/usr/iscsi_sysfs.c
+++ b/usr/iscsi_sysfs.c
@@ -706,6 +706,11 @@ static int iscsi_sysfs_read_boot(struct iface_rec *iface, char *session)
 		log_debug(5, "could not read %s/%s/subnet", boot_root,
 			  boot_nic);
 
+	if (sysfs_get_str(boot_nic, boot_root, "gateway",
+			  iface->gateway, NI_MAXHOST))
+		log_debug(5, "could not read %s/%s/gateway", boot_root,
+			  boot_nic);
+
 	log_debug(5, "sysfs read boot returns %s/%s/ vlan = %d subnet = %s",
 		  boot_root, boot_nic, iface->vlan_id, iface->subnet_mask);
 	return 0;
-- 
2.21.0