diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | lib/network/connection.pm | 12 | ||||
-rw-r--r-- | lib/network/network.pm | 2 |
3 files changed, 14 insertions, 1 deletions
@@ -1,6 +1,7 @@ - drakconnect: o add support for 802.1x EAP with WPA Enterprise Patch (mga#8577, Zombie Ryushu) + o add support for MACADDR and ETHTOOL_OPTS (Oden Eriksson, mga#8811) - drakfirewall: o check shorewall enabling via systemd (mga#8699, from Rosa) - draknfs: diff --git a/lib/network/connection.pm b/lib/network/connection.pm index c0c39a9..c92eb87 100644 --- a/lib/network/connection.pm +++ b/lib/network/connection.pm @@ -148,6 +148,9 @@ sub load_interface_settings { $self->{control}{userctl} = $self->get_ifcfg_bool('USERCTL'); $self->{control}{metric} = $self->{ifcfg}{METRIC}; $self->{control}{mtu} = $self->{ifcfg}{MTU}; + $self->{control}{macaddr} = $self->{ifcfg}{MACADDR}; + $self->{control}{hwaddr} = $self->{ifcfg}{HWADDR}; + $self->{control}{ethtool_opts} = $self->{ifcfg}{ETHTOOL_OPTS}; $self->{control}{accounting} = $self->get_ifcfg_bool('ACCOUNTING'); $self->{control}{nm_controlled} = $self->get_ifcfg_bool('NM_CONTROLLED'); $self->{control}{uuid} = $self->{ifcfg}{UUID}; @@ -250,6 +253,12 @@ sub get_control_settings { { label => N("Metric"), val => \$self->{control}{metric}, advanced => 1 }, { label => N("MTU"), val => \$self->{control}{mtu}, advanced => 1, help => N("Maximum size of network message (MTU). If unsure, left blank.") }, + { label => N("MACADDR"), val => \$self->{control}{macaddr}, advanced => 1, + help => N("Use a fake MAC address. If unset, uses HWADDR or default.") }, + { label => N("HWADDR"), val => \$self->{control}{hwaddr}, advanced => 1, + help => N("Set the MAC address. If unset, uses default.") }, + { label => N("ETHTOOL_OPTS"), val => \$self->{control}{ethtool_opts}, advanced => 1, + help => N("Use ethtool to pass options to the NIC. eg. \"autoneg off wol g\"") }, ]; } @@ -263,6 +272,9 @@ sub build_ifcfg_settings { USERCTL => bool2yesno($self->{control}{userctl}), METRIC => $self->{control}{metric}, MTU => $self->{control}{mtu}, + MACADDR => $self->{control}{macaddr}, + HWADDR => $self->{control}{hwaddr}, + ETHTOOL_OPTS => $self->{control}{ethtool_opts}, UUID => $self->{control}{uuid}, NAME => $self->{control}{name}, LAST_CONNECT => $self->{control}{last_connect}, diff --git a/lib/network/network.pm b/lib/network/network.pm index baa9cfc..ff3c1df 100644 --- a/lib/network/network.pm +++ b/lib/network/network.pm @@ -187,7 +187,7 @@ sub update_broadcast_and_network { sub write_interface_settings { my ($intf, $file) = @_; - setVarsInSh($file, $intf, qw(DEVICE BOOTPROTO IPADDR NETMASK NETWORK BROADCAST GATEWAY ONBOOT HWADDR METRIC MII_NOT_SUPPORTED TYPE USERCTL ATM_ADDR ATM_DEVICE ETHTOOL_OPTS VLAN MTU DNS1 DNS2 DOMAIN RESOLV_MODS LINK_DETECTION_DELAY), + setVarsInSh($file, $intf, qw(DEVICE BOOTPROTO IPADDR NETMASK NETWORK BROADCAST GATEWAY ONBOOT HWADDR MACADDR METRIC MII_NOT_SUPPORTED TYPE USERCTL ATM_ADDR ATM_DEVICE ETHTOOL_OPTS VLAN MTU DNS1 DNS2 DOMAIN RESOLV_MODS LINK_DETECTION_DELAY), qw(WIRELESS_MODE WIRELESS_ESSID WIRELESS_NWID WIRELESS_FREQ WIRELESS_SENS WIRELESS_RATE WIRELESS_ENC_KEY WIRELESS_ENC_MODE WIRELESS_RTS WIRELESS_FRAG WIRELESS_IWCONFIG WIRELESS_IWSPY WIRELESS_IWPRIV WIRELESS_WPA_DRIVER WIRELESS_WPA_REASSOCIATE CRDA_DOMAIN), qw(DVB_ADAPTER_ID DVB_NETWORK_DEMUX DVB_NETWORK_PID), qw(IPV6INIT IPV6TO4INIT), |