mirror of https://github.com/akuker/RASCSI.git
Disable piscsi_bridge creation
This commit is contained in:
parent
6b867346bc
commit
5c74ca177f
|
@ -31,8 +31,8 @@ using namespace network_util;
|
||||||
|
|
||||||
// const string CTapDriver::BRIDGE_NAME = "piscsi_bridge";
|
// const string CTapDriver::BRIDGE_NAME = "piscsi_bridge";
|
||||||
|
|
||||||
//static string br_setif(int br_socket_fd, const string& bridgename, const string& ifname, bool add) {
|
#if 0
|
||||||
static string br_setif(const string& ifname) {
|
static string br_setif(int br_socket_fd, const string& bridgename, const string& ifname, bool add) {
|
||||||
#ifndef __linux__
|
#ifndef __linux__
|
||||||
return "if_nametoindex: Linux is required";
|
return "if_nametoindex: Linux is required";
|
||||||
#else
|
#else
|
||||||
|
@ -41,15 +41,14 @@ static string br_setif(const string& ifname) {
|
||||||
if (ifr.ifr_ifindex == 0) {
|
if (ifr.ifr_ifindex == 0) {
|
||||||
return "Can't if_nametoindex " + ifname;
|
return "Can't if_nametoindex " + ifname;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
strncpy(ifr.ifr_name, bridgename.c_str(), IFNAMSIZ - 1); //NOSONAR Using strncpy is safe
|
strncpy(ifr.ifr_name, bridgename.c_str(), IFNAMSIZ - 1); //NOSONAR Using strncpy is safe
|
||||||
if (ioctl(br_socket_fd, add ? SIOCBRADDIF : SIOCBRDELIF, &ifr) < 0) {
|
if (ioctl(br_socket_fd, add ? SIOCBRADDIF : SIOCBRDELIF, &ifr) < 0) {
|
||||||
return "Can't ioctl " + string(add ? "SIOCBRADDIF" : "SIOCBRDELIF");
|
return "Can't ioctl " + string(add ? "SIOCBRADDIF" : "SIOCBRDELIF");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return "";
|
return "";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
string ip_link(int fd, const char* ifname, bool up) {
|
string ip_link(int fd, const char* ifname, bool up) {
|
||||||
#ifndef __linux__
|
#ifndef __linux__
|
||||||
|
|
Loading…
Reference in New Issue