summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tun.h
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1996-03-08 11:07:07 +0000
committerache <ache@FreeBSD.org>1996-03-08 11:07:07 +0000
commit50e6783510dcde971fc81270d8d046349f44ccee (patch)
treea45dd49bca30ee230f2b502b590477c752c5c50a /sys/net/if_tun.h
parent87829e5722ba264cc8eac262adc32f783072603f (diff)
downloadFreeBSD-src-50e6783510dcde971fc81270d8d046349f44ccee.zip
FreeBSD-src-50e6783510dcde971fc81270d8d046349f44ccee.tar.gz
Make user-level PPP on-demand with dynamic IP actually work.
Story so fr: 1) PPP on-demand with static IP works. 2) PPP on-demand with dynamic IP says "Host is down" on any IP request The problem is that tun driver check its READY state by *first* ifconfig address. i.e.: set ifaddr <addr> <addr2> works (static IP) and set ifaddr 0 <addr2> not works (dynamic IP) because first address is equal 0. Since tun is always POINTOPOINT interface, dst address is more meaningfull. I change checking to second (dst) address in READY test. PPP on-demand finally works.
Diffstat (limited to 'sys/net/if_tun.h')
-rw-r--r--sys/net/if_tun.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/if_tun.h b/sys/net/if_tun.h
index abf184c..d72e936 100644
--- a/sys/net/if_tun.h
+++ b/sys/net/if_tun.h
@@ -30,7 +30,7 @@ struct tun_softc {
#define TUN_ASYNC 0x0080
#define TUN_NBIO 0x0100
-#define TUN_READY (TUN_OPEN | TUN_INITED | TUN_IASET)
+#define TUN_READY (TUN_OPEN | TUN_INITED | TUN_DSTADDR)
struct ifnet tun_if; /* the interface */
int tun_pgrp; /* the process group - if any */
OpenPOWER on IntegriCloud