IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Introduce a replacement for NLMSG_OK provided by <linux/netlink.h> since
that system macro contains signedness bugs that are not going to be fixed.
* netlink.h: Include <stdbool.h>.
(is_nlmsg_ok): New static inline function.
* socketutils.c (receive_responses): Use it instead of NLMSG_OK.
* tests/netlink_inet_diag.c (check_responses): Likewise.
* tests/netlink_netlink_diag.c (check_responses): Likewise.
* tests/netlink_unix_diag.c (check_responses): Likewise.
Closes: https://github.com/strace/strace/issues/79
Automatically change tests/*.c files using the following script:
for f in tests/*.c; do
grep -q '\<assert(' "$f" ||
sed -i '/# *include *<assert\.h>/d' "$f"
done
AF_* constants appear to be more standardized, and in practice there's
always a one to one relationship between AF_* and PF_*, so let's
use AF_* instead of PF_*.
* xlat/domains.in: Remove.
* net.c: Do not define PF_UNSPEC. Stop including "xlat/domains.h".
Replace PF_* with AF_*. Replace domains with addrfams.
* tests/inet-cmsg.c: Replace PF_INET with AF_INET.
* tests/net-yy-inet.c: Likewise.
* tests/netlink_inet_diag.c: Likewise.
* tests/net-accept-connect.c: Replace PF_LOCAL with AF_LOCAL.
* tests/net-y-unix.c: Likewise.
* tests/net-yy-unix.c: Likewise.
* tests/netlink_unix_diag.c: Likewise.
* tests/net.expected: Replace PF_ with AF_.
* socketutils.c (inet_parse_response, unix_parse_response): Change
return type from bool to int, return -1 on all parse errors except
inode mismatch.
(receive_responses): Stop on the first nlmsg_type that is not
SOCK_DIAG_BY_FAMILY, also stop when the parser returns -1.
* tests/netlink_inet_diag.c (check_responses): Stop on short messages,
on first nlmsg_type that is not SOCK_DIAG_BY_FAMILY, print more verbose
diagnostics for NLMSG_ERROR.
* tests/netlink_unix_diag.c (check_responses): Likewise.
Before this change, all files that exist since 20th century had
copyright headers, while most files that appeared later didn't. This
change fixes the inconsistency by adding missing copyright headers.
It doesn't mean that copyright headers became maintained. In my view,
git history provides much better information on this subject and is much
more accurate than copyright headers.