Skip to content

Commit d33a23c

Browse files
Edison SuEdison Su
authored andcommitted
bug 12628: add default route in dhcpentrycommand
status 12628: resolved fixed
1 parent aac9c54 commit d33a23c

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,17 @@ protected synchronized Answer execute (final DhcpEntryCommand cmd) {
462462
command.add("-v", cmd.getVmIpAddress());
463463
command.add("-m", cmd.getVmMac());
464464
command.add("-n", cmd.getVmName());
465+
466+
if (cmd.getDefaultRouter() != null) {
467+
command.add(" -d " + cmd.getDefaultRouter());
468+
}
469+
if (cmd.getStaticRoutes() != null) {
470+
command.add(" -s " + cmd.getStaticRoutes());
471+
}
472+
473+
if (cmd.getDefaultDns() != null) {
474+
command.add(" -N " + cmd.getDefaultDns());
475+
}
465476

466477
final String result = command.execute();
467478
return new Answer(cmd, result==null, result);

0 commit comments

Comments
 (0)