acl: a rule's port names the service it came through by @, not by a slash

The part after the @ of a port in a rule names the service: by its
port, by the address it listens on, or by both, the address in
brackets when IPv6 —

 connlim 5 60 * * * @1080
 connlim 5 60 * * * @10.0.0.1:1080
 deny * * * @[::1]

A slash, as the delimiter of the first take, would have read as a
CIDR habit the day a service is named inside an address list, and
@ cannot appear in a port or an address. Digits alone are a port, a
dashed pair a port range, anything else an address with a port behind
a colon; an @ with nothing after it is refused. The destination port
before the @ is unchanged, and so is every rule without one.
This commit is contained in:
Vladimir Dubrovin committed 2026-11-21 17:07:12 +03:00
1 parent 59756eeb62
commit c099e632c8
7 files changed
+126 -32

No files matched your search

+1
View File
@@ -414,6 +414,7 @@ struct ace {
struct hostname *dstnames;
struct portlist *ports;
struct portlist *viaports;
struct iplist *viasrc;
struct chain *chains;
};