Skip to content

Commit

Permalink
Merge "Validate the channel before sending update."
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Dec 8, 2016
2 parents 680f1ad + 35e392d commit 72402bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/vnsw/agent/cmn/agent.h
Expand Up @@ -677,6 +677,11 @@ class Agent {
void set_dns_xmpp_channel(AgentDnsXmppChannel *chnl, uint8_t idx) {
dns_xmpp_channel_[idx] = chnl;
}
bool is_dns_xmpp_channel(AgentDnsXmppChannel *channel) {
if (channel == dns_xmpp_channel_[0] || channel == dns_xmpp_channel_[1])
return true;;
return false;
}

// DNS Server and port
const std::string &dns_server(uint8_t idx) const {return dns_addr_[idx];}
Expand Down
2 changes: 1 addition & 1 deletion src/vnsw/agent/services/dns_handler.cc
Expand Up @@ -779,7 +779,7 @@ bool DnsHandler::UpdateAll() {

void DnsHandler::SendXmppUpdate(AgentDnsXmppChannel *channel,
DnsUpdateData *xmpp_data) {
if (channel) {
if (channel && agent_->is_dns_xmpp_channel(channel)) {
// Split the request in case we have more data items
DnsItems done, store;
DnsItems::iterator first, last;
Expand Down

0 comments on commit 72402bf

Please sign in to comment.