hive-egress: the spoof log line says which check failed
Each refused frame now goes through its own chain, spoof_<reason>, whose log prefix names the check that refused it (mac, vlan, dhcp, v4, v6, arp). The unmetered log lines of all reasons share one named limit, spoof_unmetered, so the budget stays one for all ports and reasons.
This commit is contained in:
parent
c9e6cd2e61
commit
96334845f0
1 changed files with 93 additions and 39 deletions
|
|
@ -864,13 +864,16 @@ source check lives in that table and the host-side filtering stays in
|
|||
- **The log.** A refused frame (all of them with `drop`, the same ones with
|
||||
`log`) gets a kernel log line with the prefix `hive-egress-spoof `, rate
|
||||
limited per port: a burst of 20, then one a second. A frame its port can't log
|
||||
gets a line with the prefix `hive-egress-spoof-unmetered ` instead, from a limit
|
||||
shared by all ports: 5 lines a second after a burst of 50. Read them with
|
||||
`journalctl -k -g hive-egress-spoof`. `IN=` is the port, `vb-<machine>` (`vb-h-<agent>` for
|
||||
an agent), and `SRC` and `MAC=<dst>:<src>:<type>` are what the container
|
||||
sent; the port names the sender, because a bound port sends only its own MAC.
|
||||
The counters in `nft list chain bridge hive_egress spoof` count every refused
|
||||
frame.
|
||||
gets a line with the prefix `hive-egress-spoof-unmetered ` instead, from one
|
||||
limit shared by all ports and reasons: 5 lines a second after a burst of 50.
|
||||
Read them with `journalctl -k -g hive-egress-spoof`. The word after the
|
||||
prefix is the check that refused the frame: `mac` (the port isn't bound to
|
||||
the source MAC), `vlan`, `dhcp` (the `chaddr` isn't the port's), `v4`, `v6` or
|
||||
`arp`; each has its own chain, `spoof_<reason>`, with its own counters. `IN=`
|
||||
is the port, `vb-<machine>` (`vb-h-<agent>` for an agent), and `SRC` and
|
||||
`MAC=<dst>:<src>:<type>` are what the container sent; the port names the
|
||||
sender, because a bound port sends only its own MAC. The counters in
|
||||
`nft list chain bridge hive_egress spoof` count every refused frame.
|
||||
- **Why `log` is the default.** A container that sends from its leased address
|
||||
and its own MAC is never refused by `drop`, but only while the pair stays in
|
||||
the table, and a host suspend/resume empties it. `log` keeps the lines and
|
||||
|
|
|
|||
Loading…
Reference in a new issue