Bug #8138
closedOption <spoofmac> is ignored on interfaces without hwaddr
100%
Description
MAC Address in GUI is not applyed to interface and allways set to random value. This causes a lot of problems if interface is LAN.
Updated by Michael Sh. almost 7 years ago
I did this:
write_config(sprintf(gettext('The invalid MAC address (ff:ff:ff:ff:ff:ff) on interface %1$s has been automatically repla file_notice("MAC Address altered", sprintf(gettext('The invalid MAC address (ff:ff:ff:ff:ff:ff) on interface %1$s has be } elseif (!empty($wancfg['spoofmac']) && ($wancfg['spoofmac'] != $current_mac)) { # <-- mwexec("/sbin/ifconfig " . escapeshellarg($realhwif) . " link " . escapeshellarg($wancfg['spoofmac'])); } /* media */
Updated by Steve Wheeler over 6 years ago
Confirmed. MAC spoofing is broken on bridge interfaces and still broken in 2.4.4a. Testing on CE amd64.
Initially:
BRIDGE Interface (opt3, bridge0)
Status
up
MAC Address
02:01:c7:92:dc:00
IPv4 Address
10.215.45.1
Subnet mask IPv4
255.255.255.252
MTU
1500
In/out packets
0/0 (0 B/0 B)
In/out packets (pass)
0/0 (0 B/0 B)
In/out packets (block)
0/0 (0 B/0 B)
In/out errors
0/0
Collisions
0
Apply spoofing, bridge MAC does not change.
After reboot:
BRIDGE Interface (opt3, bridge0)
Status
up
MAC Address
02:f7:23:e6:d0:00
IPv4 Address
10.215.45.1
Subnet mask IPv4
255.255.255.252
MTU
1500
In/out packets
0/0 (0 B/0 B)
In/out packets (pass)
0/0 (0 B/0 B)
In/out packets (block)
0/0 (0 B/0 B)
In/out errors
0/0
Collisions
0
Config:
<opt3>
<descr><![CDATA[Bridge]]></descr>
<if>bridge0</if>
<enable></enable>
<spoofmac>00:80:78:11:22:33</spoofmac>
<ipaddr>10.215.45.1</ipaddr>
<subnet>30</subnet>
</opt3>
Updated by Jim Pingle over 6 years ago
- Category set to Interfaces
- Priority changed from High to Normal
- Target version set to 2.4.4
- Affected Version changed from 2.4.2 to 2.4.x
- Affected Architecture All added
- Affected Architecture deleted (
)
Updated by Anonymous over 6 years ago
- Status changed from New to In Progress
- Assignee changed from Renato Botelho to Anonymous
Updated by Anonymous over 6 years ago
- Status changed from In Progress to New
- Assignee changed from Anonymous to Renato Botelho
Updated by Renato Botelho over 6 years ago
- Status changed from 13 to In Progress
Updated by Renato Botelho over 6 years ago
- Subject changed from Option <spoofmac> is ignored at least for interface bridge to Option <spoofmac> is ignored on interfaces without hwaddr
Code is not changing any interface that doesn't have `hwaddr` item. I'm working on a fix to save original mac address created by OS when interface is created
Updated by Renato Botelho over 6 years ago
- Status changed from In Progress to Feedback
Updated by Renato Botelho over 6 years ago
- % Done changed from 0 to 100
Applied in changeset 2c1d7c12fa4f41a69d6c9267a34b1b767a1da522.
Updated by Anonymous over 6 years ago
- Status changed from Feedback to Resolved
Tested on a VM with CE:
2.4.4-DEVELOPMENT (amd64)
built on Wed Aug 29 00:38:57 EDT 2018
FreeBSD 11.2-RELEASE-p2
Was able to create a bridge and set a MAC and have it stay.
[descr] => LAN [if] => bridge0 [spoofmac] => aa:aa:aa:aa:aa:aa [enable] => bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 ether aa:aa:aa:aa:aa:aa inet6 ::d prefixlen 128
Setting as resolved.