mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
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
069c46d51d
commit
f7163ba751
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=14421
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue