Skip to content

mcd v3.1

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Oct 13:06
v3.1
7663208

Faster convergence and Multicast Router Discovery. mcd queries the LAN as soon as a bridge port starts forwarding, can advertise itself to snooping switches that learn router ports from MRD, and follows an interface's own query-interval in all its timers. Many fixes for robustness, found by fuzzing and static analysis in the Nix flake contributed by Dave Seddon.

Note

The router timeout and the group membership interval now follow an interface's own query-interval. With query-interval 4 on a bridge, mcd takes over from a silent querier after 13 sec and drops a group without members after 18 sec, not after 255 and 260 sec. An explicit router-timeout still applies to all interfaces.

Changes

  • General query when a bridge port starts forwarding, RFC 4541 §2.1.1. Link up, STP settling and a port added to the bridge all count, for the bridge itself and VLAN interfaces on top of it. Hosts behind the port are back in the MDB within the response interval instead of at the next periodic query. On by default, see topology-query in mcd.conf(5)
  • Multicast Router Discovery, RFC 4286, IGMP and MLD. New iface keyword mrd on advertises mcd as a multicast router to the snooping switches on the LAN, answers their solicitations, and sends a termination on the way down. Off by default. New global keyword mrd-interval sets the advertisement interval, 4 to 180 sec
  • mctl show routers lists the multicast routers heard through MRD on each interface, with their advertised intervals. mctl show interfaces has a new MRD column
  • mctl show interfaces json lists each interface's router timeout as router-timeout. mctl show labels the global value as the default
  • New mcd -t option to check a configuration file and exit, like nginx -t. Errors are reported as FILE:LINE: message, and it runs as a normal user
  • Shell completion for mctl, bash and zsh. The commands come from the running daemon, via the new mctl -C option. Installed with make install, see --with-bash-completion-dir and --with-zsh-completion-dir
  • Nix flake with a development shell, native and cross builds, OCI images, static analysis, fuzzing, and the test suite in microVMs, see nix/README.md. By Dave Seddon

Fixes

  • Fix router timeout (other querier present interval) ignoring the configured robustness, query and response intervals. It was always 255 sec unless router-timeout was set, it now follows each interface's own query-interval
  • Fix group membership interval ignoring the interface's own query-interval
  • Fix -l LEVEL having no effect in the foreground, mcd -n printed every message, debug included, whatever the level
  • Fix mctl show router-ports and show igmp json missing the router ports of bridges with a hyphen in their name, e.g. br-0
  • Fix shell command injection through bridge names when listing router ports. Linux allows characters like ; and $ in interface names
  • Fix IPC error replies, e.g. for an unknown command, never reaching the client
  • Fix mcd dying of SIGPIPE when an IPC client hangs up before reading its reply
  • Fix mcd exiting 0 when it cannot fork to daemonize
  • Fix mctl crashing on a daemon command of more than 32 words
  • Fix timers stopping if an expiry landed exactly on a whole second
  • Fix misaligned IP header access in the packet buffers, a fault on strict-alignment targets
  • Fix crashes and buffer overruns on malformed input in the .conf parser, IPC commands, and bridge mdb show / bridge -j output, as well as for a group on many bridge ports