-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Roto files to DEB/RPM packages in /etc/rotonda/filters/ dir (reso…
…lves #46) (#51) * Move integration test .roto script files to a new test-data/ directory. * Remove unused .roto files. * Package .roto scripts for installation under /etc/rotonda/filters/. * Mark roto filter files as config files to resolve lintian error `file-in-etc-not-marked-as-conffile`. * Test more aspects of the built packages. * More synchronization of the systemd and non-systemd rotonda.conf file variants. * Use an RFC 6996 private use ASN as the default example value, not an actual ASN.
- Loading branch information
Showing
10 changed files
with
100 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
filter-map my-module { | ||
define { | ||
rx_tx bgp_msg: BgpUpdateMessage; | ||
} | ||
|
||
term afi-safi-unicast { | ||
match { | ||
bgp_msg.nlris.afi != IPV4; | ||
} | ||
} | ||
|
||
action send-message { | ||
asn-encounter-report.send({ | ||
name: "local-broker", // this name can be used by a target to select only messages intended for it | ||
topic: "testing", | ||
message: String.format("🤭 I encountered {}", "1818") | ||
}); | ||
} | ||
|
||
apply { | ||
filter match afi-safi-unicast matching { | ||
send-message; | ||
}; | ||
} | ||
} | ||
|
||
filter bmp-in-filter { | ||
// Uncomment to use ASN filtering | ||
define { | ||
rx msg: BmpMessage; | ||
filtered_asn = 65000; | ||
} | ||
|
||
term has_asn { | ||
// Compare the ASN for BMP message types that have a Per Peer Header. | ||
// Other message types not mentioned here lack the Per Peer Header and so | ||
// do not have a matching ASN and are treated as such. | ||
match msg with { | ||
PeerDownNotification(pd_msg) -> pd_msg.per_peer_header.asn == filtered_asn, | ||
PeerUpNotification(pu_msg) -> pu_msg.per_peer_header.asn == filtered_asn, | ||
RouteMonitoring(rm_msg) -> rm_msg.per_peer_header.asn == filtered_asn, | ||
StatisticsReport(sr_msg) -> sr_msg.per_peer_header.asn == filtered_asn, | ||
} | ||
} | ||
|
||
apply { | ||
filter match has_asn matching { | ||
return reject; | ||
}; | ||
accept; | ||
} | ||
} | ||
|
||
output-stream asn-encounter-report contains Message { | ||
name: String, // this is the name of the target that should consume this message | ||
topic: String, // the meaning of this is target type specific | ||
message: String // this can be one or many fields of any type? | ||
} |