summaryrefslogtreecommitdiff
path: root/src/common/address.h
AgeCommit message (Collapse)Author
2018-06-27Move network code to libtor-net.Nick Mathewson
There are some additional changes to come: those points are marked by XXXX.
2018-06-22Move util_bug into libtor-logNick Mathewson
2018-06-22Expunge container.hNick Mathewson
2018-06-22Extract smartlist.h from container.hNick Mathewson
2018-06-22Rectify include paths after container split (automatic)Nick Mathewson
2018-06-21Simplify include structure of container.[ch]Nick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-02-09Merge remote-tracking branch 'dgoulet/ticket24902_029_05'Nick Mathewson
2018-02-08Add an address-set backend using a bloom filter.Nick Mathewson
We're going to need this to make our anti-DoS code (see 24902) more robust.
2017-12-08Replace all FREE_AND_NULL* uses to take a type and a free function.Nick Mathewson
This commit was made mechanically by this perl script: \#!/usr/bin/perl -w -i -p next if /^#define FREE_AND_NULL/; s/\bFREE_AND_NULL\((\w+),/FREE_AND_NULL\(${1}_t, ${1}_free_,/; s/\bFREE_AND_NULL_UNMATCHED\(/FREE_AND_NULL\(/;
2017-12-08Switch to a safer FREE_AND_NULL implementationNick Mathewson
This one only evaluates the input once, so it cannot mess up even if there are side effects.
2017-12-08Convert the rest of src/common's headers to use FREE_AND_NULLNick Mathewson
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-03-15Run the copyright update script.Nick Mathewson
2017-01-03Make tor_addr_lookup() mockable.Nick Mathewson
2016-12-16Lay down some infrastructure for bridges in the New Guard Order.Nick Mathewson
This includes: * making bridge_info_t exposed but opaque * allowing guards where we don't know an identity * making it possible to learn the identity of a guard * creating a guard that lacks a node_t * remembering a guard's address and port. * Looking up a guard by address and port. * Only enforcing the rule that we need a live consensus to update the "listed" status for guards when we are not using bridges.
2016-06-12Keep make check-spaces happyAndrea Shepard
2016-06-11Enable -Wnull-dereference (GCC >=6.1), and fix the easy casesNick Mathewson
This warning, IIUC, means that the compiler doesn't like it when it sees a NULL check _after_ we've already dereferenced the variable. In such cases, it considers itself free to eliminate the NULL check. There are a couple of tricky cases: One was the case related to the fact that tor_addr_to_in6() can return NULL if it gets a non-AF_INET6 address. The fix was to create a variant which asserts on the address type, and never returns NULL.
2016-03-28Rename tor_dup_addr to tor_addr_to_str_dup.Nick Mathewson
Patch from icanhasaccount; closes 18462.
2016-02-27Update the copyright year.Nick Mathewson
2016-01-29Merge branch 'feature17840-v11-squashed' into feature17840-v11-mergedteor (Tim Wilson-Brown)
Conflicts: src/or/directory.c src/test/test_routerlist.c Fix minor conflicts.
2016-01-29Fix *_get_all_orports to use ipv6_orportteor (Tim Wilson-Brown)
node_get_all_orports and router_get_all_orports incorrectly used or_port with IPv6 addresses. They now use ipv6_orport. Also refactor and remove duplicated code.
2016-01-03Add family argument to get_interface_addresses_raw (and subfunctions).rl1987
2015-12-15Replace usage of INLINE with inlinecypherpunks
This patch was generated using; sed -i -e "s/\bINLINE\b/inline/" src/*/*.[ch] src/*/*/*.[ch]
2015-12-07Consistently ignore multicast in internal reject private exit policiesteor (Tim Wilson-Brown)
Consistently ignore multicast addresses when automatically generating reject private exit policies. Closes ticket 17763. Bug fix on 10a6390deb3c9, not in any released version of Tor. Patch by "teor".
2015-09-29Add checks and unit tests for get_interface_address* failureteor (Tim Wilson-Brown)
Ensure that either a valid address is returned in address pointers, or that the address data is zeroed on error. Ensure that free_interface_address6_list handles NULL lists. Add unit tests for get_interface_address* failure cases. Fixes bug #17173. Patch by fk/teor, not in any released version of tor.
2015-09-16Merge branch 'bug17027-reject-private-all-interfaces-v2' into bug16069-bug17027teor (Tim Wilson-Brown)
src/test/test_policy.c: Merged calls to policies_parse_exit_policy by adding additional arguments. fixup to remaining instance of ~EXIT_POLICY_IPV6_ENABLED. Compacting logic test now produces previous list length of 4, corrected this. src/config/torrc.sample.in: src/config/torrc.minimal.in-staging: Merged torrc modification dates in favour of latest.
2015-09-16ExitPolicy accept6/reject6 produces IPv6 wildcard addresses onlyteor (Tim Wilson-Brown)
In previous versions of Tor, ExitPolicy accept6/reject6 * produced policy entries for IPv4 and IPv6 wildcard addresses. To reduce operator confusion, change accept6/reject6 * to only produce an IPv6 wildcard address. Resolves bug #16069. Patch on 2eb7eafc9d78 and a96c0affcb4c (25 Oct 2012), released in 0.2.4.7-alpha.
2015-09-15Add get_interface_address[6]_list for a list of interface IP addressesteor (Tim Wilson-Brown)
Add get_interface_address[6]_list by refactoring get_interface_address6. Add unit tests for new and existing functions. Preparation for ticket 17027. Patch by "teor". Patch on 42b8fb5a1523 (11 Nov 2007), released in 0.2.0.11-alpha.
2015-09-14Update comments about ExitPolicy parsingteor (Tim Wilson-Brown)
Fix incomplete and incorrect comments. Comment changes only.
2015-03-31Merge branch 'ticket14710_squashed'Nick Mathewson
2015-03-31Black box test for get_interface_address6_via_udp_socket_hack().rl1987
2015-02-12Actually get all interface addressesSebastian Hahn
If we guessed a buffer size too small, we never increased the buffer and tried again Also simplify the interface of ifreq_to_smartlist a little
2015-01-23Merge branch 'if_addr_refactoring_squashed'Nick Mathewson
Conflicts: src/test/include.am src/test/test.c
2015-01-23Refactor code that looks up addresses from interfacesrl1987
Now the code has separate implementation and examination functions, uses smartlists sanely, and has relatively decent test coverage.
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-12-29Merge branch 'resolvemyaddr_squashed'Nick Mathewson
2014-12-29Adding comprehensive test cases for resolve_my_address.rl1987
Also, improve comments on resolve_my_address to explain what it actually does.
2014-10-28Add another year to our copyright dates.Nick Mathewson
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right?
2014-09-15Clear up another clangalyzer issueNick Mathewson
"The NULL pointer warnings on the return value of tor_addr_to_in6_addr32() are incorrect. But clang can't work this out itself due to limited analysis depth. To teach the analyser that the return value is safe to dereference, I applied tor_assert to the return value." Patch from teor. Part of 13157.
2014-04-05Merge remote-tracking branch 'public/bug10801_024'Nick Mathewson
Conflicts: src/common/address.c src/or/config.c
2014-04-01Merge remote-tracking branch 'public/bug4645'Nick Mathewson
Conflicts: src/or/dirserv.c
2014-03-27Don't do a DNS lookup on a bridge line addressNick Mathewson
Fixes bug 10801; bugfix on 07bf274d in 0.2.0.1-alpha.
2014-02-12Siphash-2-4 is now our hash in nearly all cases.Nick Mathewson
I've made an exception for cases where I'm sure that users can't influence the inputs. This is likely to cause a slowdown somewhere, but it's safer to siphash everything and *then* look for cases to optimize. This patch doesn't actually get us any _benefit_ from siphash yet, since we don't really randomize the key at any point.
2014-02-03Removing is_internal_IP() function. Resolves ticket 4645.rl1987
2013-03-01Remove the unused addr_mask_cmp_bitsNick Mathewson
2013-03-01Remove the unused parse_addr_and_port_rangeNick Mathewson
2013-02-23Remove some totally unused functionsNick Mathewson