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.
This commit is contained in:
parent
e4a5c7e8bc
commit
8479e04c61
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user