]> git.ipfire.org Git - thirdparty/tor.git/commit
Add a new family-specific syntax for tor_addr_parse_mask_ports
authorNick Mathewson <nickm@torproject.org>
Wed, 24 Oct 2012 16:33:18 +0000 (12:33 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 15 Nov 2012 04:16:21 +0000 (23:16 -0500)
commit2eb7eafc9d789cb5063dd36021412434b656bf75
tree6fb621cd10a3d41a242d2588c9a533a743570194
parent462ebb270a10f02573b1847649db45b94c0e0fc3
Add a new family-specific syntax for tor_addr_parse_mask_ports

By default, "*" means "All IPv4 addresses" with
tor_addr_parse_mask_ports, so I won't break anything.  But if the new
EXTENDED_STAR flag is provided, then * means "any address", *4 means
"any IPv4 address" (that is, 0.0.0.0/0), and "*6" means "any IPv6
address" (that is, [::]/0).

This is going to let us have a syntax for specifying exit policies in
torrc that won't drive people mad.

Also, add a bunch of unit tests for tor_addr_parse_mask_ports to test
these new features, and to increase coverage.
src/common/address.c
src/common/address.h
src/or/config.c
src/or/policies.c
src/or/routerparse.c
src/test/test_addr.c