diff options
author | brian <brian@FreeBSD.org> | 2001-05-02 16:35:24 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2001-05-02 16:35:24 +0000 |
commit | 58f11f683be0815ac0d0e1d66328d0fa842d3bc8 (patch) | |
tree | 9832afdecfd08748cc267e6c61fbdadd631dd5b7 /usr.sbin/ppp/iface.c | |
parent | 1501296e82bd1611cafb4dd5272e10cb2eb31fe0 (diff) | |
download | FreeBSD-src-58f11f683be0815ac0d0e1d66328d0fa842d3bc8.zip FreeBSD-src-58f11f683be0815ac0d0e1d66328d0fa842d3bc8.tar.gz |
Handle situations where we've already got a P2P interface address
of a/x -> b and then negotiate a/x -> c by simply expecting SIOCAIFADDR
to do the change.
This was broken by the last commit that optimised out the deletion and
re-addition of the same a/x -> b combination, and forgot to compare
the old/new destination addresses.
Conveniently enough, this problem didn't effect setups where the
default route goes via the ppp link, and most other setups don't
care what the the destination address is actually set to. It broke
test environments where ppp connects to the local machine rather
badly though....
Diffstat (limited to 'usr.sbin/ppp/iface.c')
-rw-r--r-- | usr.sbin/ppp/iface.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/ppp/iface.c b/usr.sbin/ppp/iface.c index a58fdac..5384340 100644 --- a/usr.sbin/ppp/iface.c +++ b/usr.sbin/ppp/iface.c @@ -303,7 +303,12 @@ iface_inAdd(struct iface *iface, struct in_addr ifa, struct in_addr mask, * the IP number as a destination. */ if (chg == slot && iface->in_addr[chg].mask.s_addr == mask.s_addr) { - nochange = 1; + if (brd.s_addr == iface->in_addr[slot].brd.s_addr) + nochange = 1; + /* + * If only the destination address has changed, the SIOCAIFADDR + * we do after the current loop will change it. + */ continue; } if (s == -1 && (s = ID0socket(AF_INET, SOCK_DGRAM, 0)) == -1) { |