Intentionally do the wrong thing in using the initial DHCP values for
ifconfig, essentially stealing the lease until the user goes and changes it. The alternative, sadly, is total dysfunction since bpf isn't in GENERIC and network connectivity would otherwise fail completely on first bootup when DHCP configuration was attempted again. The ultimate answer here is to make either bpf a loadable kernel module (which security conscious admins will be able to simply remove from /modules) or come up with a lighter weight mechanism just for dhcp and other apps that need to see broadcast packets but not otherwise sniff the wire in full bpf glory.
This commit is contained in:
parent
aa30608b44
commit
5bc001833f
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: tcpip.c,v 1.84 1999/07/19 10:18:52 jkh Exp $
|
||||
* $Id: tcpip.c,v 1.85 1999/07/19 11:00:56 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Gary J Palmer. All rights reserved.
|
||||
@ -384,9 +384,11 @@ tcpOpenDialog(Device *devp)
|
||||
di->use_dhcp = use_dhcp;
|
||||
|
||||
sprintf(ifn, "%s%s", VAR_IFCONFIG, devp->name);
|
||||
#ifdef notyet /* XXX this will only work once bpf is a loadable kernel mod */
|
||||
if (use_dhcp)
|
||||
sprintf(temp, "DHCP");
|
||||
else
|
||||
#endif
|
||||
sprintf(temp, "inet %s %s netmask %s", ipaddr, extras, netmask);
|
||||
variable_set2(ifn, temp, 1);
|
||||
ifaces = variable_get(VAR_INTERFACES);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: tcpip.c,v 1.84 1999/07/19 10:18:52 jkh Exp $
|
||||
* $Id: tcpip.c,v 1.85 1999/07/19 11:00:56 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Gary J Palmer. All rights reserved.
|
||||
@ -384,9 +384,11 @@ tcpOpenDialog(Device *devp)
|
||||
di->use_dhcp = use_dhcp;
|
||||
|
||||
sprintf(ifn, "%s%s", VAR_IFCONFIG, devp->name);
|
||||
#ifdef notyet /* XXX this will only work once bpf is a loadable kernel mod */
|
||||
if (use_dhcp)
|
||||
sprintf(temp, "DHCP");
|
||||
else
|
||||
#endif
|
||||
sprintf(temp, "inet %s %s netmask %s", ipaddr, extras, netmask);
|
||||
variable_set2(ifn, temp, 1);
|
||||
ifaces = variable_get(VAR_INTERFACES);
|
||||
|
Loading…
Reference in New Issue
Block a user