aboutgitcodebugslistschat
path: root/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'tcp.c')
-rw-r--r--tcp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tcp.c b/tcp.c
index e9f6e3e..2defc2d 100644
--- a/tcp.c
+++ b/tcp.c
@@ -2699,16 +2699,14 @@ int tcp_listen(const struct ctx *c, uint8_t pif,
/* Restrict to v6 only */
addr = &inany_any6;
else if (inany_v4(addr))
- /* Nothing to do */
- return 0;
+ return -EAFNOSUPPORT;
}
if (!c->ifi6) {
if (!addr)
/* Restrict to v4 only */
addr = &inany_any4;
else if (!inany_v4(addr))
- /* Nothing to do */
- return 0;
+ return -EAFNOSUPPORT;
}
if (pif == PIF_HOST) {