* [LTP] [PATCH 1/1] lib/safe_net: TCONF SAFE_LISTEN() on ENOSYS
@ 2021-12-10 14:35 Petr Vorel
2021-12-10 15:53 ` Cyril Hrubis
0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2021-12-10 14:35 UTC (permalink / raw)
To: ltp
This is needed at least on bind04 on SLES with Common Criteria setup,
which is more strict and thus does not allow md5 usage:
bind04.c:138: TBROK: listen(3, 1) failed: ENOSYS (38)
sctp: failed to load transform for md5: -2
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
lib/safe_net.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/safe_net.c b/lib/safe_net.c
index 211fd9b67d..1717f0745f 100644
--- a/lib/safe_net.c
+++ b/lib/safe_net.c
@@ -368,11 +368,14 @@ int safe_listen(const char *file, const int lineno, void (cleanup_fn)(void),
int socket, int backlog)
{
int rval;
+ int res = TBROK;
rval = listen(socket, backlog);
if (rval == -1) {
- tst_brkm_(file, lineno, TBROK | TERRNO, cleanup_fn,
+ if (errno == ENOSYS)
+ res = TCONF;
+ tst_brkm_(file, lineno, res | TERRNO, cleanup_fn,
"listen(%d, %d) failed", socket, backlog);
} else if (rval) {
tst_brkm_(file, lineno, TBROK | TERRNO, cleanup_fn,
--
2.34.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH 1/1] lib/safe_net: TCONF SAFE_LISTEN() on ENOSYS
2021-12-10 14:35 [LTP] [PATCH 1/1] lib/safe_net: TCONF SAFE_LISTEN() on ENOSYS Petr Vorel
@ 2021-12-10 15:53 ` Cyril Hrubis
2021-12-15 11:01 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Cyril Hrubis @ 2021-12-10 15:53 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
Hi!
> bind04.c:138: TBROK: listen(3, 1) failed: ENOSYS (38)
> sctp: failed to load transform for md5: -2
Looks reasonable.
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH 1/1] lib/safe_net: TCONF SAFE_LISTEN() on ENOSYS
2021-12-10 15:53 ` Cyril Hrubis
@ 2021-12-15 11:01 ` Petr Vorel
0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2021-12-15 11:01 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hi Cyril,
> Hi!
> > bind04.c:138: TBROK: listen(3, 1) failed: ENOSYS (38)
> > sctp: failed to load transform for md5: -2
> Looks reasonable.
> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Merged. Thanks!
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-15 11:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-10 14:35 [LTP] [PATCH 1/1] lib/safe_net: TCONF SAFE_LISTEN() on ENOSYS Petr Vorel
2021-12-10 15:53 ` Cyril Hrubis
2021-12-15 11:01 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).