dhclient-script, hooks, and changing the environment
martin f krafft
madduck at debian.org
Fri Aug 8 18:29:43 UTC 2008
also sprach Theodore Tso <tytso at 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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
Url : http://lists.alioth.debian.org/pipermail/netconf-devel/attachments/20080808/aa025a41/attachment.pgp
More information about the netconf-devel
mailing list