Commit 595550a
committed
gluon-nftables-limit-arp: limit each client device separately
The migration collapsed the per-device rate limit into a single limit
statement, which keeps one bucket for the whole rule - all client devices
shared it, so a single noisy device used up the budget of every other one.
The package documents a limit per device.
ebtables kept a bucket per rule, which is why the daemon added one rule per
address. The rules are static here, so use a dynamic set keyed on the
source address instead: every address gets its own bucket. The node-wide
limit stays a plain limit statement, as it was a single rule before too.
The limited address is the ethernet source, as in the ebtables ruleset, not
the ARP sender hardware address.
Requests for a target in the DAT cache now return early instead of being
excluded in every rule, which keeps them out of the counting as documented.
The interface matches that were commented out inside the chain are gone -
the rule jumping into it already matches on them.1 parent 31f1d73 commit 595550a
2 files changed
Lines changed: 44 additions & 50 deletions
File tree
- package/gluon-nftables-limit-arp/files/lib/gluon/nftables
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
142 | 163 | | |
143 | 164 | | |
144 | 165 | | |
| |||
193 | 214 | | |
194 | 215 | | |
195 | 216 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | 217 | | |
200 | 218 | | |
201 | 219 | | |
| |||
Lines changed: 23 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | | - | |
10 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
11 | 21 | | |
12 | | - | |
13 | 22 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
18 | 26 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
41 | 32 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 33 | + | |
51 | 34 | | |
52 | | - | |
53 | | - | |
| 35 | + | |
| 36 | + | |
54 | 37 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
0 commit comments