nispor: do not filter out route rules without ip-to/ip-from
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
This commit is contained in:
parent
13fb417349
commit
27f9a51951
@ -10,15 +10,6 @@ pub(crate) fn get_route_rules(np_rules: &[nispor::RouteRule]) -> RouteRules {
|
||||
if np_rule.action != nispor::RuleAction::Table {
|
||||
continue;
|
||||
}
|
||||
// Neither ip_from or ip_to should be defeind
|
||||
if np_rule.dst.is_none() && np_rule.src.is_none() {
|
||||
continue;
|
||||
}
|
||||
if np_rule.dst.as_deref() == Some("")
|
||||
&& np_rule.src.as_deref() == Some("")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
rule.ip_to = np_rule.dst.clone();
|
||||
rule.ip_from = np_rule.src.clone();
|
||||
rule.table_id = np_rule.table;
|
||||
|
Loading…
x
Reference in New Issue
Block a user