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:
Fernando Fernandez Mancera 2022-10-28 16:58:56 +02:00 committed by Fernando Fernández Mancera
parent 13fb417349
commit 27f9a51951

View File

@ -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;