Hello again!

OK, this time it's a bug, (or is it a feature?), in dhclient.

Imagine that you have two separate wireless networks, which operate
independently using the same private address spaces and offer leases
based on the same algorithm computed from the MAC address of the
client.

For example:

Network 1 - SSID foo, AP IP 192.168.64.1 netmask 255.255.255.0
Network 2 - SSID bar, AP IP 192.168.64.1 netmask 255.255.255.0

But these are NOT connected in any way.  They are two completely
different networks.  E.G. 192.168.64.20, (by way of example), on
foo, is a different machine to 192.168.64.20 on bar.  Maybe one
is your office network and one is a home network.

Now, imagine that you have another machine, (probably a laptop),
which connects to either one, but never both at the same time.

This machine is assigned an IP by DHCP when it joins either
network.  The DHCP server assigns IPs based pseudo randomly based
on MAC address.

If both networks use identical algorithms to calculate this IP,
then the laptop will be assigned the same IP regardless of the
network it joins.  Imagine that it's assigned 192.168.64.10.

This causes problems with dhclient, when you switch between
networks whilst a lease is still valid on the first one.  It works,
but if you pass the -L option to dhclient, it doesn't produce the
normal output, presumably because it believes that it's continuing
with an active lease.

This causes problems with scripts.

A script such as this:

#!/bin/sh
ifconfig if0 nwid foo wpakey bar
sleep 3
dhclient -L /output
cat /output

fails with cat: /test: No such file or directory.

dhclient needs to recognise that it is not just continuing with an
active lease, even though the new lease has the same parameters it
has come from a different dhcp server.
-- 
Creamy! <3

Reply via email to