We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent def7cb5 commit 684f8d5Copy full SHA for 684f8d5
1 file changed
src/services/pcn-iptables/src/Chain.cpp
@@ -232,6 +232,10 @@ ChainInsertOutputJsonObject Chain::insert(ChainInsertInputJsonObject input) {
232
id = input.getId();
233
}
234
235
+ if (id > rules_.size()) {
236
+ throw std::runtime_error("id not allowed");
237
+ }
238
+
239
auto newRule = std::make_shared<ChainRule>(*this, conf);
240
241
ChainStatsJsonObject confStats;
@@ -1072,4 +1076,4 @@ void Chain::delRuleList() {
1072
1076
if (parent_.interactive_) {
1073
1077
applyRules();
1074
1078
1075
-}
1079
+}
0 commit comments