diff --git a/engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql b/engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql index 4c1609e80429..782dea30b2e8 100644 --- a/engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql +++ b/engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql @@ -274,6 +274,6 @@ CREATE TABLE IF NOT EXISTS `cloud`.`bgp_peer_network_map` ( `removed` datetime DEFAULT NULL COMMENT 'date removed', PRIMARY KEY (`id`), CONSTRAINT `fk_bgp_peer_network_map__bgp_peer_id` FOREIGN KEY (`bgp_peer_id`) REFERENCES `bgp_peers`(`id`), - CONSTRAINT `fk_bgp_peer_network_map__network_id` FOREIGN KEY (`network_id`) REFERENCES `networks`(`id`) + CONSTRAINT `fk_bgp_peer_network_map__network_id` FOREIGN KEY (`network_id`) REFERENCES `networks`(`id`), CONSTRAINT `fk_bgp_peer_network_map__vpc_id` FOREIGN KEY (`vpc_id`) REFERENCES `vpc`(`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/server/src/main/java/org/apache/cloudstack/network/RoutedIpv4ManagerImpl.java b/server/src/main/java/org/apache/cloudstack/network/RoutedIpv4ManagerImpl.java index 482a011fd6a6..9c08513e6506 100644 --- a/server/src/main/java/org/apache/cloudstack/network/RoutedIpv4ManagerImpl.java +++ b/server/src/main/java/org/apache/cloudstack/network/RoutedIpv4ManagerImpl.java @@ -1331,9 +1331,9 @@ private SearchCriteria createSearchCriteriaForListBgpPeersCmd(Long id, Long zone if (StringUtils.isNotBlank(keyword)) { SearchCriteria ssc = bgpPeerDao.createSearchCriteria(); ssc.addOr("asNumber", SearchCriteria.Op.LIKE, "%" + keyword + "%"); - ssc.addOr("ipaddress", SearchCriteria.Op.LIKE, "%" + keyword + "%"); - ssc.addOr("ip6address", SearchCriteria.Op.LIKE, "%" + keyword + "%"); - sc.addAnd("ipaddress", SearchCriteria.Op.SC, ssc); + ssc.addOr("ip4Address", SearchCriteria.Op.LIKE, "%" + keyword + "%"); + ssc.addOr("ip6Address", SearchCriteria.Op.LIKE, "%" + keyword + "%"); + sc.addAnd("ip4Address", SearchCriteria.Op.SC, ssc); } return sc; }