History log of /unit/src/nxt_sockaddr.c (Results 1 – 25 of 32)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 2232:1fb2182a4d03 02-Nov-2022 Alejandro Colomar

Removed the unsafe nxt_memchr() wrapper for memchr(3).

The casts are unnecessary, since memchr(3)'s argument is 'const void *'.
It might have been necessary in the times of K&R, where 'void *' didn'

Removed the unsafe nxt_memchr() wrapper for memchr(3).

The casts are unnecessary, since memchr(3)'s argument is 'const void *'.
It might have been necessary in the times of K&R, where 'void *' didn't
exist. Nowadays, it's unnecessary, and _very_ unsafe, since casts can
hide all classes of bugs by silencing most compiler warnings.

The changes from nxt_memchr() to memchr(3) were scripted:

$ find src/ -type f \
| grep '\.[ch]$' \
| xargs sed -i 's/nxt_memchr/memchr/'

Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>

show more ...


# 2231:5b3a69fd47a7 02-Nov-2022 Alejandro Colomar

Removed the unsafe nxt_memcmp() wrapper for memcmp(3).

The casts are unnecessary, since memcmp(3)'s arguments are 'void *'.
It might have been necessary in the times of K&R, where 'void *' didn't
ex

Removed the unsafe nxt_memcmp() wrapper for memcmp(3).

The casts are unnecessary, since memcmp(3)'s arguments are 'void *'.
It might have been necessary in the times of K&R, where 'void *' didn't
exist. Nowadays, it's unnecessary, and _very_ unsafe, since casts can
hide all classes of bugs by silencing most compiler warnings.

The changes from nxt_memcmp() to memcmp(3) were scripted:

$ find src/ -type f \
| grep '\.[ch]$' \
| xargs sed -i 's/nxt_memcmp/memcmp/'

Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>

show more ...


Revision tags: 1.28.0-1, 1.28.0
# 2181:bb0bd4a80464 28-Jul-2022 Alejandro Colomar

Disallowed abstract unix socket syntax in non-Linux systems.

The previous commit added/fixed support for abstract Unix domain sockets
on Linux with a leading '@' or '\0'. To be consistent in all pl

Disallowed abstract unix socket syntax in non-Linux systems.

The previous commit added/fixed support for abstract Unix domain sockets
on Linux with a leading '@' or '\0'. To be consistent in all platforms,
treat those prefixes as markers for abstract sockets in all platforms,
and fail if abstract sockets are not supported by the platform.

That will avoid mistakes when copying a config file from a Linux system
and using it in non-Linux, which would surprisingly create a normal socket.

show more ...


# 2175:e83cff38d672 03-Aug-2022 Alejandro Colomar

Removed dead code.

nxt_sockaddr_ntop() stopped being used in commit (git) 029942f4eb71.
It has been replaced mostly by nxt_sockaddr_text().

commit 029942f4eb7196c2cff0d0e26bc6ff274138f7d8
A

Removed dead code.

nxt_sockaddr_ntop() stopped being used in commit (git) 029942f4eb71.
It has been replaced mostly by nxt_sockaddr_text().

commit 029942f4eb7196c2cff0d0e26bc6ff274138f7d8
Author: Igor Sysoev <igor@sysoev.ru>
Date: Wed Feb 22 15:09:59 2017 +0300

I/O operations refactoring.

nxt_job_sockaddr_parse() stopped being used in commit (git) 794248090a74.

commit 794248090a74f31cbfcf24ea8c835df2d4d21073
Author: Igor Sysoev <igor@sysoev.ru>
Date: Wed Mar 4 14:04:08 2020 +0300

Legacy upstream code removed.

Also, remove functions and types used only by those two functions:

nxt_job_sockaddr_unix_parse()
nxt_job_sockaddr_inet6_parse()
nxt_job_sockaddr_inet_parse()
nxt_job_sockaddr_parse_t
nxt_job_resolve()
nxt_job_resolve_t

show more ...


# 2154:68987edde84a 23-Jun-2022 Alejandro Colomar

Fixed incorrect code.

The #endif was misplaced by accident during a refactor:
<https://github.com/nginx/unit/commit/029942f4eb7196c2cff0d0e26bc6ff274138f7d8>.

clang(1)'s -Wunreachable-code-break (i

Fixed incorrect code.

The #endif was misplaced by accident during a refactor:
<https://github.com/nginx/unit/commit/029942f4eb7196c2cff0d0e26bc6ff274138f7d8>.

clang(1)'s -Wunreachable-code-break (implied by -Weverything) catches
that, but it is only produced for code compiled without support
for Unix sockets, which is probably the reason it was undetected:
no-one seems to be compiling Unit without Unix sockets support (at
least with clang(1)).

show more ...


# 2141:c820888cd98c 16-Jun-2022 Andrew Clayton

Socket: removed useless port < 1 check.

In src/nxt_sockaddr.c::nxt_job_sockaddr_inet_parse() there is a check
that port > 0 then there is a check that port < 1 || port > 65535, well
we _know_ it can

Socket: removed useless port < 1 check.

In src/nxt_sockaddr.c::nxt_job_sockaddr_inet_parse() there is a check
that port > 0 then there is a check that port < 1 || port > 65535, well
we _know_ it can't be less than 1.

show more ...


Revision tags: 1.27.0-1, 1.27.0, 1.26.1-1, 1.26.1, 1.26.0-1, 1.26.0, 1.25.0-1, 1.25.0
# 1935:ba08638c3259 12-Aug-2021 Oisin Canty

Introduced nxt_sockaddr_parse_optport() for addresses w/o ports.


# 1909:d6a5090da2ea 02-Jul-2021 Oisin Canty

Fixing crash during IPv6 text address generation.

When the textual representation of an IPv6 nxt_sockaddr_t was being
generated, a crash would occur if the address had a full IPv6 form:

f607:7403:1

Fixing crash during IPv6 text address generation.

When the textual representation of an IPv6 nxt_sockaddr_t was being
generated, a crash would occur if the address had a full IPv6 form:

f607:7403:1e4b:6c66:33b2:843f:2517:da27

This was caused by a variable that tracks the location of a
collapsed group ("::") that was not set to a sane default. When
the address was generated, a group would be inserted when
it was not necessary, thus causing an overflow.

This closes #481 issue on GitHub.

show more ...


Revision tags: 1.24.0-1, 1.24.0, 1.23.0-1, 1.23.0, 1.22.0-1, 1.22.0, 1.21.0-1, 1.21.0, 1.20.0-1, 1.20.0, 1.19.0-1, 1.19.0, 1.18.0-1, 1.18.0, 1.17.0-1, 1.17.0, 1.16.0-1, 1.16.0, 1.15.0-1, 1.15.0, 1.14.0-1, 1.14.0
# 1324:73562b05bf48 24-Dec-2019 Axel Duch

Router: introducing routing on client address.


Revision tags: 1.13.0-1, 1.13.0
# 1266:22a29a8b15e2 14-Nov-2019 Igor Sysoev

Event engine memory cache refactored.


Revision tags: 1.12.0-1, 1.12.0, 1.11.0-2, 1.11.0-1, 1.11.0, 1.10.0-2, 1.10.0-1, 1.10.0, 1.9.0-1, 1.9.0
# 1008:84f2370bd642 11-Mar-2019 Andrey Zelenkov

Style.


Revision tags: 1.8.0-1, 1.8.0, 1.7.1-1, 1.7.1, 1.7-1, 1.7, 1.6-1, 1.6, 1.5-1, 1.5, 1.4-2, 1.4
# 763:da7ddf9e1104 17-Sep-2018 Igor Sysoev

Fixed typo.

This closes #165 issue on GitHub.
Thanks to 洪志道 (Hong Zhi Dao).


Revision tags: 1.3
# 703:2d536dde84d2 25-Jun-2018 Valentin Bartenev

Introduced nxt_length() macro.


Revision tags: 1.2, 1.1, 1.0
# 611:323e11065f83 04-Apr-2018 Valentin Bartenev

Style: capitalized letters in hexadecimal literals.


Revision tags: 0.7, 0.6, 0.5
# 493:745222d540a2 24-Jan-2018 Sergey Kandaurov

Using size_t for the field width type of the "%*s" specifier.


Revision tags: 0.4, 0.3, 0.2
# 358:40bbd4c2349d 17-Oct-2017 Igor Sysoev

Storing memory cache slot hint inside nxt_sockaddr_t.


# 337:854a1a440616 27-Sep-2017 Igor Sysoev

Event engine memory cache for nxt_sockaddr_t.

Introducing event engine memory cache and using the cache for
nxt_sockaddr_t structures.


Revision tags: 0.1
# 211:6738bb76ae0a 16-Aug-2017 Ruslan Ermilov

Corrected path to nxt_socket.h in comments.


# 110:b367ad00650d 29-Jun-2017 Igor Sysoev

Fixed port processing in nxt_sockaddr_text().


# 102:8dc96d9dcff7 28-Jun-2017 Igor Sysoev

Small optimization in nxt_sockaddr_text().


# 101:54f45ac7c564 27-Jun-2017 Igor Sysoev

Fixed INET6 sockaddr processing in nxt_sockaddr_text().


# 100:07429a5af734 27-Jun-2017 Igor Sysoev

Fixed Unix sockaddr processing in nxt_sockaddr_text().


# 99:f7ff1263f690 27-Jun-2017 Igor Sysoev

nxt_sockaddr_parse() introducted.


# 98:4077decf847b 27-Jun-2017 Valentin Bartenev

Applied nxt_pointer_to() and nxt_value_at() where possible.


# 71:26f40ec12921 21-Jun-2017 Valentin Bartenev

Removed surplus type casting from nxt_memcmp() calls.


12