test test_ipprefix {
let matcher = matchers.IpPrefixes.new([127.0.0.1 / 32]);
if !matcher.matches(127.0.0.1 / 32) { reject }
if matcher.matches(10.0.0.1 / 24) { reject }
let prefix = match "127.0.0.1/32".to_prefix() {
Ok(v) => v,
Err(_) => { reject },
};
if !matcher.matches(prefix) { reject }
accept
}
This passes just fine, yay!
Still need a maxminddb & SecCHUA matcher, the latter is going to be a bit different than the rest, I think, since it needs to parse the header, and... bla bla bla bla bla.
I'm too much into Deep Hack Mode to explain.
