Skip to content

Commit a875355

Browse files
ustcweizhourohityadavcloud
authored andcommitted
Do not set gateway to 0.0.0.0 for windows clients
1 parent abd52cc commit a875355

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

server/src/com/cloud/network/router/CommandSetupHelper.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@
108108
import com.cloud.offerings.NetworkOfferingVO;
109109
import com.cloud.offerings.dao.NetworkOfferingDao;
110110
import com.cloud.service.dao.ServiceOfferingDao;
111-
import com.cloud.storage.GuestOSVO;
112-
import com.cloud.storage.dao.GuestOSDao;
113111
import com.cloud.user.Account;
114112
import com.cloud.uservm.UserVm;
115113
import com.cloud.utils.Pair;
@@ -174,8 +172,6 @@ public class CommandSetupHelper {
174172
private VlanDao _vlanDao;
175173
@Inject
176174
private IPAddressDao _ipAddressDao;
177-
@Inject
178-
private GuestOSDao _guestOSDao;
179175

180176
@Inject
181177
private RouterControlHelper _routerControlHelper;
@@ -221,12 +217,6 @@ public void createDhcpEntryCommand(final VirtualRouter router, final UserVm vm,
221217
_networkModel.getExecuteInSeqNtwkElmtCmd());
222218

223219
String gatewayIp = nic.getIPv4Gateway();
224-
if (!nic.isDefaultNic()) {
225-
final GuestOSVO guestOS = _guestOSDao.findById(vm.getGuestOSId());
226-
if (guestOS == null || !guestOS.getDisplayName().toLowerCase().contains("windows")) {
227-
gatewayIp = "0.0.0.0";
228-
}
229-
}
230220

231221
final DataCenterVO dcVo = _dcDao.findById(router.getDataCenterId());
232222

0 commit comments

Comments
 (0)