diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-02-06 10:49:41 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-02-06 10:49:41 +0000 |
commit | 132be924b5dfc58c2095c55c13384e7ff4453857 (patch) | |
tree | 09cec931a15215387d365a8f587ae52cd2cc5669 /sys/net/if_tun.h | |
parent | d852f74247cb83762208d907431676d44bd2c410 (diff) |
Change the behaviour of tun(4) on close.
- if the interface was auto-created by opening a /dev/tun* device it will
auto-destroy on close. This is comparable to ifconfig tun0 destroy and
will remove all routes and addresses associated with the interface.
- if the interface was created by ifconfig(8) or hostname.if(5) the interface
is persistent -- it is just marked as not running. Especially routes are no
longer removed when the interface is closed. This is useful for static
setups like the server side of a ssh vpn or static qemu session.
This behaviour is more logic then the half done cleanup that is currently done.
OK mpf@
Diffstat (limited to 'sys/net/if_tun.h')
-rw-r--r-- | sys/net/if_tun.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_tun.h b/sys/net/if_tun.h index 4e06b14171a..eea043e2596 100644 --- a/sys/net/if_tun.h +++ b/sys/net/if_tun.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.h,v 1.14 2006/08/20 16:13:26 stevesk Exp $ */ +/* $OpenBSD: if_tun.h,v 1.15 2007/02/06 10:49:40 claudio Exp $ */ /* * Copyright (c) 1988, Julian Onions <Julian.Onions@nexor.co.uk> @@ -33,7 +33,7 @@ #define TUN_OPEN 0x0001 #define TUN_INITED 0x0002 -#define TUN_RCOLL 0x0004 +#define TUN_RCOLL 0x0004 /* unused */ #define TUN_IASET 0x0008 #define TUN_DSTADDR 0x0010 #define TUN_RWAIT 0x0040 |