summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tun.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1996-12-02 21:07:33 +0000
committerjulian <julian@FreeBSD.org>1996-12-02 21:07:33 +0000
commit3e183c63bffe7004a612fcd5938586a2479a5279 (patch)
treee86dcedf129c14e84d6b793fa508cadac50d9c69 /sys/net/if_tun.c
parent32491cf461dc595de0f3e4143c93e9729846fecf (diff)
downloadFreeBSD-src-3e183c63bffe7004a612fcd5938586a2479a5279.zip
FreeBSD-src-3e183c63bffe7004a612fcd5938586a2479a5279.tar.gz
2 small changes:
1/ increase the tun MTU from 1500 to 1600 to allow it to be used with packets formatted according to RFC1490 and RFC1717 2/ allow the tsleep() when reading, to be interruptable by signals so that one can now do: od -xc </dev/tun0 to dump packets for debugging without getting hung. Passed on by: Archie@whistle.com (archie Cobbs) Nice but not neccessary in 2.2
Diffstat (limited to 'sys/net/if_tun.c')
-rw-r--r--sys/net/if_tun.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 3b0d98e..9518c31 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -479,7 +479,11 @@ tunread(dev_t dev, struct uio *uio, int flag)
return EWOULDBLOCK;
}
tp->tun_flags |= TUN_RWAIT;
- tsleep((caddr_t)tp, PZERO + 1, "tunread", 0);
+ if( error = tsleep((caddr_t)tp, PCATCH | (PZERO + 1),
+ "tunread", 0)) {
+ splx(s);
+ return error;
+ }
}
} while (m0 == 0);
splx(s);
OpenPOWER on IntegriCloud