Skip to content

Commit

Permalink
Merge "Add prefix check for DNS servers." into R3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Mar 23, 2016
2 parents 4f43689 + 5b01403 commit 29c345e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -32,13 +32,13 @@ define([
hostRouteModelConfigValidations: {
'prefix':
function (value, attr, finalObj) {
if (!((value && value.indexOf('/') != -1) || isValidIP(value))) {
if (!((value && value.indexOf('/') != -1) && isValidIP(value))) {
return 'Enter Prefix in form xxx.xxx.xxx.xxx/xx';
}
},
'next_hop':
function (value, attr, finalObj) {
if (!(isValidIP(value))) {
if ((value && value.indexOf('/') != -1) || !isValidIP(value)) {
return 'Enter Next Hop in form xxx.xxx.xxx.xxx';
}
},
Expand Down
Expand Up @@ -34,7 +34,7 @@ define([
if (value && value.length) {
var dnsServers = value.split(' ');
$.each(dnsServers, function (idx, dnsServer) {
if (!isValidIP(dnsServer)) {
if (dnsServer.indexOf('/') != -1 || !isValidIP(dnsServer)) {
err.push(dnsServer);
}
});
Expand Down

0 comments on commit 29c345e

Please sign in to comment.