summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-06-23 18:54:15 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-06-23 18:54:15 +0000
commit9e198552165e2e473a9cb6792a70fe85fecbc987 (patch)
treec3769ae20ddf2dca2fa97b10fd6c6210fd4a5d1b /test
parent5b675858211437ea5d42ca49bbfbe15aeece65a9 (diff)
Use the correct socket descriptor for incoming connections
Diffstat (limited to 'test')
-rw-r--r--test/l2test.c2
-rw-r--r--test/rctest.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/l2test.c b/test/l2test.c
index fffa7fd8..acf4a23c 100644
--- a/test/l2test.c
+++ b/test/l2test.c
@@ -447,7 +447,7 @@ static void do_listen(void (*handler)(int sk))
if (timestamp) {
int t = 1;
- if (setsockopt(sk, SOL_SOCKET, SO_TIMESTAMP, &t, sizeof(t)) < 0) {
+ if (setsockopt(nsk, SOL_SOCKET, SO_TIMESTAMP, &t, sizeof(t)) < 0) {
syslog(LOG_ERR, "Can't enable SO_TIMESTAMP: %s (%d)",
strerror(errno), errno);
goto error;
diff --git a/test/rctest.c b/test/rctest.c
index 2e366c72..2c69b5b2 100644
--- a/test/rctest.c
+++ b/test/rctest.c
@@ -270,7 +270,7 @@ static void do_listen(void (*handler)(int sk))
if (timestamp) {
int t = 1;
- if (setsockopt(sk, SOL_SOCKET, SO_TIMESTAMP, &t, sizeof(t)) < 0) {
+ if (setsockopt(nsk, SOL_SOCKET, SO_TIMESTAMP, &t, sizeof(t)) < 0) {
syslog(LOG_ERR, "Can't enable SO_TIMESTAMP: %s (%d)",
strerror(errno), errno);
goto error;