yelreve
January 6, 2023, 12:30pm
16
I've updated the main branch now with the negative matching ability, I took it one step further to allow mixing both negative and positive matches on a single rule (though probably a fairly niche use case).
committed 12:20PM - 06 Jan 23 UTC
Negative IP/sets/port rule matches should be prefaced with the ! character, exam… ples:
```
list ip '!192.168.1.1'
list port '!100-1015'
list port '!@setname'
```
Rules support use of regular matches and negated matches, example:
```
config rule
option name 'DNS'
list proto 'tcp'
list proto 'udp'
list dest_port '!53'
list dest_port '853'
list dest_port '!5353'
option class 'cs5'
```
Sets using the interval option will have auto-merge enabled for efficiency.
@anon78773196 I think your config in thread Sharing dscpclassify configuration on OpenWrt should now work as expected with the main code branch.
It also includes the auto-merge tweak for sets with intervals.
@Hudra you're correct, the rule counters only count matched connections (not every packet in the connection).
7 Likes