also sprach Theodore Tso <tytso@mit.edu> [2008.08.08.1453 -0300]:
> In the past I've used dhclient-enter-hooks.d to work around buggy
> hotel networks which advertise a gateway for the default route
> which is outside the local network.
netconf could handle this internally, and it would be fair to
include this.
So assuming yo get a 192.168.0.0/24 address and the default gateway
is 10.0.0.1, what is the best approach? Hacking the netmask seems
awful. Adding a route that makes 10.0.0.1 link-local seems better,
no?
so assuming a CIDR $ip_addr object, a $router object, and the $iface
string parsed from dhclient, you'd do:
if not ip_addr.get_network().includes(router):
add_linklocal_route(router, iface)
?
--
.''`. martin f. krafft <madduck@debian.org>
: :' : proud Debian developer, author, administrator, and user
`. `'` http://people.debian.org/~madduck - http://debiansystem.info
`- Debian - when you have better things to do than fixing systems
you can't assign IP address 127.0.0.1 to the loopback adapter,
because it is a reserved address for loopback devices.
-- micro$oft windoze xp professional
Attachment:
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)