mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 908135 - Remove dhcp attribute in nsINetworkInterface. r=vyang, vchang
This commit is contained in:
parent
5fea521976
commit
10355a0807
@ -321,7 +321,6 @@ NetworkManager.prototype = {
|
||||
state: i.state,
|
||||
type: i.type,
|
||||
name: i.name,
|
||||
dhcp: i.dhcp,
|
||||
ip: i.ip,
|
||||
netmask: i.netmask,
|
||||
broadcast: i.broadcast,
|
||||
@ -597,7 +596,7 @@ NetworkManager.prototype = {
|
||||
setDefaultRouteAndDNS: function setDefaultRouteAndDNS(oldInterface) {
|
||||
debug("Going to change route and DNS to " + this.active.name);
|
||||
let options = {
|
||||
cmd: this.active.dhcp ? "runDHCPAndSetDefaultRouteAndDNS" : "setDefaultRouteAndDNS",
|
||||
cmd: "setDefaultRouteAndDNS",
|
||||
ifname: this.active.name,
|
||||
oldIfname: (oldInterface && oldInterface != this.active) ? oldInterface.name : null,
|
||||
gateway_str: this.active.gateway,
|
||||
|
@ -3351,8 +3351,6 @@ RILNetworkInterface.prototype = {
|
||||
|
||||
name: null,
|
||||
|
||||
dhcp: false,
|
||||
|
||||
ip: null,
|
||||
|
||||
netmask: null,
|
||||
|
@ -250,21 +250,6 @@ function setDefaultRouteAndDNS(options) {
|
||||
libcutils.property_set("net.dnschange", (parseInt(dnschange, 10) + 1).toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Run DHCP and set default route and DNS servers for a given
|
||||
* network interface.
|
||||
*/
|
||||
function runDHCPAndSetDefaultRouteAndDNS(options) {
|
||||
let dhcp = libnetutils.dhcp_do_request(options.ifname);
|
||||
dhcp.ifname = options.ifname;
|
||||
dhcp.oldIfname = options.oldIfname;
|
||||
|
||||
//TODO this could be race-y... by the time we've finished the DHCP request
|
||||
// and are now fudging with the routes, another network interface may have
|
||||
// come online that's preferred...
|
||||
setDefaultRouteAndDNS(dhcp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove default route for given network interface.
|
||||
*/
|
||||
|
@ -7,7 +7,7 @@
|
||||
/**
|
||||
* Information about networks that is exposed to network manager API consumers.
|
||||
*/
|
||||
[scriptable, uuid(d70b9d95-87d5-4ce9-aff7-4323dac79b07)]
|
||||
[scriptable, uuid(04fe5049-1ea8-4b4f-8c27-d23cd24611bb)]
|
||||
interface nsINetworkInterface : nsISupports
|
||||
{
|
||||
const long NETWORK_STATE_UNKNOWN = -1;
|
||||
@ -39,11 +39,6 @@ interface nsINetworkInterface : nsISupports
|
||||
*/
|
||||
readonly attribute DOMString name;
|
||||
|
||||
/**
|
||||
* Indicates whether DHCP should be run when the interface connects.
|
||||
*/
|
||||
readonly attribute boolean dhcp;
|
||||
|
||||
/**
|
||||
* IP Address
|
||||
*/
|
||||
|
@ -1826,10 +1826,6 @@ let WifiNetworkInterface = {
|
||||
|
||||
name: null,
|
||||
|
||||
// For now we do our own DHCP. In the future this should be handed off
|
||||
// to the Network Manager.
|
||||
dhcp: false,
|
||||
|
||||
ip: null,
|
||||
|
||||
netmask: null,
|
||||
|
Loading…
Reference in New Issue
Block a user