File tree Expand file tree Collapse file tree
src/services/pcn-iptables/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -232,6 +232,10 @@ ChainInsertOutputJsonObject Chain::insert(ChainInsertInputJsonObject input) {
232232 id = input.getId ();
233233 }
234234
235+ if (id > rules_.size ()) {
236+ throw std::runtime_error (" id not allowed" );
237+ }
238+
235239 auto newRule = std::make_shared<ChainRule>(*this , conf);
236240
237241 ChainStatsJsonObject confStats;
@@ -1072,4 +1076,4 @@ void Chain::delRuleList() {
10721076 if (parent_.interactive_ ) {
10731077 applyRules ();
10741078 }
1075- }
1079+ }
Original file line number Diff line number Diff line change @@ -176,6 +176,20 @@ bool ChainRule::equal(ChainRule &cmp) {
176176 return false ;
177177 }
178178
179+ if (inIfaceIsSet != cmp.inIfaceIsSet )
180+ return false ;
181+ if (inIfaceIsSet) {
182+ if (inIface != cmp.inIface )
183+ return false ;
184+ }
185+
186+ if (outIfaceIsSet != cmp.outIfaceIsSet )
187+ return false ;
188+ if (outIfaceIsSet) {
189+ if (outIface != cmp.outIface )
190+ return false ;
191+ }
192+
179193 if (actionIsSet != cmp.actionIsSet )
180194 return false ;
181195
You can’t perform that action at this time.
0 commit comments