Merge pull request #559 from bluewavenet/master
[feed/routing.git] / mcproxy / patches / 0005-fix-match-filter-calls.patch
1 --- a/mcproxy/src/proxy/simple_mc_proxy_routing.cpp
2 +++ b/mcproxy/src/proxy/simple_mc_proxy_routing.cpp
3 @@ -118,13 +118,13 @@ void interface_memberships::process_upst
4 for (auto source_it = cs.first.m_source_list.begin(); source_it != cs.first.m_source_list.end();) {
5
6 //downstream out
7 - if (!cs.second->match_output_filter(interfaces::get_if_name(upstr_e.m_if_index), gaddr, source_it->saddr)) {
8 + if (!cs.second->match_output_filter(interfaces::get_if_name(upstr_e.m_if_index), source_it->saddr, gaddr)) {
9 source_it = cs.first.m_source_list.erase(source_it);
10 continue;
11 }
12
13 //upstream in
14 - if (!upstr_e.m_interface->match_input_filter(interfaces::get_if_name(upstr_e.m_if_index), gaddr, source_it->saddr)) {
15 + if (!upstr_e.m_interface->match_input_filter(interfaces::get_if_name(upstr_e.m_if_index), source_it->saddr, gaddr)) {
16 tmp_sstate.m_source_list.insert(*source_it);
17 source_it = cs.first.m_source_list.erase(source_it);
18 continue;
19 @@ -175,13 +175,13 @@ void interface_memberships::process_upst
20 for (auto source_it = cs_it->first.m_source_list.begin(); source_it != cs_it->first.m_source_list.end();) {
21
22 //downstream out
23 - if (!cs_it->second->match_output_filter(interfaces::get_if_name(upstr_e.m_if_index), gaddr, source_it->saddr)) {
24 + if (!cs_it->second->match_output_filter(interfaces::get_if_name(upstr_e.m_if_index), source_it->saddr, gaddr)) {
25 ++source_it;
26 continue;
27 }
28
29 //upstream in
30 - if (!upstr_e.m_interface->match_input_filter(interfaces::get_if_name(upstr_e.m_if_index), gaddr, source_it->saddr)) {
31 + if (!upstr_e.m_interface->match_input_filter(interfaces::get_if_name(upstr_e.m_if_index), source_it->saddr, gaddr)) {
32 ++source_it;
33 continue;
34 }
35 @@ -619,9 +619,9 @@ bool simple_mc_proxy_routing::check_inte
36 std::string input_if_index_name = interfaces::get_if_name(input_if_index);
37 if (!input_if_index_name.empty()) {
38 if (interface_direction == ID_IN) {
39 - return interf->match_input_filter(input_if_index_name, gaddr, saddr);
40 + return interf->match_input_filter(input_if_index_name, saddr, gaddr);
41 } else if (interface_direction == ID_OUT) {
42 - return interf->match_output_filter(input_if_index_name, gaddr, saddr);
43 + return interf->match_output_filter(input_if_index_name, saddr, gaddr);
44 } else {
45 HC_LOG_ERROR("unkown interface direction");
46 return false;