aboutsummaryrefslogtreecommitdiff
path: root/src/lib/net
AgeCommit message (Collapse)Author
2020-11-12Fix typos.Samanta Navarro
Typos found with codespell. Please keep in mind that this should have impact on actual code and must be carefully evaluated: src/core/or/lttng_circuit.inc - ctf_enum_value("CONTROLER", CIRCUIT_PURPOSE_CONTROLLER) + ctf_enum_value("CONTROLLER", CIRCUIT_PURPOSE_CONTROLLER)
2020-10-01fix typosRoger Dingledine
no actual changes
2020-07-29Remove the connection_t.outbuf_flushlen fieldNick Mathewson
This was once used for rate-limiting, but now it's only for accounting. It hasn't served a useful purpose in a long time. Closes ticket 33097.
2020-07-17Add a tor_addr_port_copy() function.Nick Mathewson
2020-07-14addr: Use tor_addr_t instead of uint32_t for IPv4David Goulet
This changes a LOT of code but in the end, behavior is the same. Unfortunately, many functions had to be changed to accomodate but in majority of cases, to become simpler. Functions are also removed specifically those that were there to convert an IPv4 as a host format to a tor_addr_t. Those are not needed anymore. The IPv4 address field has been standardized to "ipv4_addr", the ORPort to "ipv4_orport" (currently IPv6 uses ipv6_orport) and DirPort to "ipv4_dirport". This is related to Sponsor 55 work that adds IPv6 support for relays and this work is needed in order to have a common interface between IPv4 and IPv6. Closes #40043. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-02Add a convenience function to check for unspec address.Nick Mathewson
2020-06-09Merge remote-tracking branch 'tor-github/pr/1888/head'Nick Mathewson
2020-06-05Merge remote-tracking branch 'tor-github/pr/1902/head'Nick Mathewson
2020-06-05Fix some checks of tor_inet_ntoa() return valuerl1987
Also, fix a format string.
2020-06-04config: Styling fix + use fmt_addr()c
Conform to C99 as suggested by nickm on #32888 and use fmt_addr() rather than tor_addr_to_str_dup()
2020-06-03config: Add interface address debug loggingc
Add logging for "the local network interface addresses" as requested by ticket #32888.
2020-05-21Tweak format stringrl1987
2020-05-21Check for possible failures of tor_inet_ntop/tor_inet_ntoa in fmt_addr32 and ↵rl1987
tor_dup_ip
2020-05-07relay: Rewrite inform_testing_reachability()teor
Rewrite inform_testing_reachability() to use separate buffers for IPv4 ORPort, IPv6 ORPort, and IPv4 DirPort. And use consistent APIs to fill those buffers. Part of 33222.
2020-05-07Define and use TOR_ADDRPORT_BUF_LENNeel Chauhan
2020-05-06Merge branch 'maint-0.4.3'Nick Mathewson
2020-05-06Merge branch 'maint-0.4.2' into maint-0.4.3Nick Mathewson
2020-05-06Merge branch 'maint-0.4.1' into maint-0.4.2Nick Mathewson
2020-05-06Merge branch 'bug34078_prelim_035' into bug34078_prelim_041Nick Mathewson
2020-05-06address.c: add a single (harmless) missing break;Nick Mathewson
2020-04-30relay: Launch IPv4 and IPv6 ORPort self-test circuitsteor
When launching relay ORPort reachability self-tests, launch tests to the IPv4 and IPv6 ORPorts (if available). Part of 33222.
2020-04-30Merge branch 'pr1870_squashed'teor
2020-04-30Define and use TOR_ADDRPORT_BUF_LENNeel Chauhan
2020-04-29Merge remote-tracking branch 'tor-github/pr/1864/head'Nick Mathewson
2020-04-30net: Make all address bytes functions take uint8_t *teor
Part of 33817.
2020-04-30Rename tor_addr_get_ipv6_bytes to tor_addr_copy_ipv6_bytesteor
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ tor_addr_get_ipv6_bytes tor_addr_copy_ipv6_bytes
2020-04-29relay/circuitbuild: Re-use IPv6 connections for circuitsteor
Search for existing connections using the remote IPv4 and IPv6 addresses. Part of 33817.
2020-04-29net: Add fmt_addrport_ap() and fmt_addr_family()teor
Add fmt_addrport_ap(), a macro that takes a tor_addr_port_t, and uses it to call fmt_addrport(). Add fmt_addr_family(), a function that returns a string constant describing the address family. Utility functions for 33817.
2020-04-29net: Remove an extra space in address.hteor
2020-04-29core/or: Support IPv6 EXTEND2 cellsteor
Allow clients and relays to send dual-stack and IPv6-only EXTEND2 cells. Parse dual-stack and IPv6-only EXTEND2 cells on relays. Relays do not make connections or extend circuits via IPv6: that's the next step. Closes ticket 33901.
2020-04-24Merge remote-tracking branch 'onionk/inbufoverflow1-043' into ticket33131_044Nick Mathewson
2020-04-08hs-v3: Report SOCKS ExtendedErrors when all intro timed outDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-04-07address: Simplify tor_addr_is_valid()teor
And rewrite the function comment. Part of 33679.
2020-04-07Added tests for tor_addr_is_null/valid()MrSquanchee
Added tests for tor_addr_is_valid(), and added tests for tor_addr_is_null(), which is not modfied. Ticket 33679
2020-04-07Merge branch 'pr1838_squashed'teor
2020-03-27correct tor_addr_family() function commentRoger Dingledine
kind of a losing game to remember to update that comment when we add another possible family, but hey, maybe it will be a while until we add one more.
2020-03-26Add a SUBSYS_DECLARE_LOCATION() to every subsystem.Nick Mathewson
2020-03-24net, tls: use BUF_MAX_LENcypherpunks
2020-03-24net, tls: use INT_MAX - 1 in checks for buf_tcypherpunks
No functionality change.
2020-03-05Merge branch 'clang_format_prep_3'Nick Mathewson
2020-02-13Re-order most subsystems to correspond to dependency order.Nick Mathewson
2020-02-11Merge branch 'ticket32362_squashed'Nick Mathewson
2020-02-11Check for leading zeros in tor_inet_aton()Neel Chauhan
2020-02-10Use semicolons after HT_PROTOTYPE and HT_GENERATE.Nick Mathewson
2020-02-06Try to shorten an #error in address.cNick Mathewson
2020-02-04address: Fix comments in address.hteor
And improve inline function spacing, and function declaration spacing. Comment-only change.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2020-01-06Space the a-d unsigned ints in tor_inet_aton()Neel Chauhan
2019-12-20Fix spacing in tor_sscanf() call in tor_inet_aton()Neel Chauhan
2019-12-20Fix spacing in tor_inet_aton() function headerNeel Chauhan