summaryrefslogtreecommitdiff
path: root/sys/net/if_spppsubr.c
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2017-06-16 10:58:44 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2017-06-16 10:58:44 +0000
commit58ffba5818455706bdcd7d754b58882ecc81240b (patch)
tree554dea1d6903bf537dfccf6a375cf3a1f0e18a6d /sys/net/if_spppsubr.c
parent56378216a7af80d25a92bc732333cdbb3b757a4b (diff)
In sppp(4), allow additional 'wildcard' addresses for the destination.
Any address within the range 0.0.0.1 - 0.0.0.255 can now be used. This allows for multiple pppoe(4) interfaces with dynamic addresses within the same routing table. Which used to work before OpenBSD 5.8, but since 5.8 only one interface in a routing table can use destination address 0.0.0.1. Problem first reported by Steve (fiverings04 at australian yahoo) on misc@. I ran into it on an EdgeRouter lite which is supposed to serve two ADSL lines. ok sthen@ mpi@ man page help from jmc@ for an earlier variant of this change
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r--sys/net/if_spppsubr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index c3ad8882d7c..b89d99e85cf 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_spppsubr.c,v 1.164 2017/05/30 07:50:37 mpi Exp $ */
+/* $OpenBSD: if_spppsubr.c,v 1.165 2017/06/16 10:58:43 stsp Exp $ */
/*
* Synchronous PPP link level subroutines.
*
@@ -2632,7 +2632,7 @@ sppp_ipcp_tls(struct sppp *sp)
sp->ipcp.flags |= IPCP_MYADDR_DYN;
sp->ipcp.opts |= (1 << IPCP_OPT_ADDRESS);
}
- if (hisaddr == 1) {
+ if (hisaddr >= 1 && hisaddr <= 255) {
/*
* XXX - remove this hack!
* remote has no valid address, we need to get one assigned.