diff options
author | julian <julian@FreeBSD.org> | 1996-12-02 21:07:33 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1996-12-02 21:07:33 +0000 |
commit | 3e183c63bffe7004a612fcd5938586a2479a5279 (patch) | |
tree | e86dcedf129c14e84d6b793fa508cadac50d9c69 /sys/net/if_tun.c | |
parent | 32491cf461dc595de0f3e4143c93e9729846fecf (diff) | |
download | FreeBSD-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.c | 6 |
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); |