[VOL-3239] Fix MAC address reported to adapter when
Edgecore OLT is running in In-band mode.
-The openolt-agent report the MAC address of the interface on which the GRPC server is listening on.

Change-Id: Iee44d8247c7b86b312d6e289ab0607af6bf57c5d
diff --git a/agent/common/main.cc b/agent/common/main.cc
index 4ebe2b8..b00b9b5 100644
--- a/agent/common/main.cc
+++ b/agent/common/main.cc
@@ -19,6 +19,7 @@
 
 #include "server.h"
 #include "core.h"
+#include "src/core_data.h"
 
 using namespace std;
 
@@ -137,6 +138,13 @@
     }
     else
         pushOltOperInd(0, "nni", "up");
+
+    for (int i = 1; i < argc; ++i) {
+       if(strcmp(argv[i-1], "--interface") == 0 || (strcmp(argv[i-1], "--intf") == 0)) {
+          grpc_server_interface_name = argv[i];
+          break;
+       }
+    }
     RunServer(argc, argv);
 
     return 0;