Modify

Opened 8 years ago

Closed 8 years ago

Last modified 2 years ago

#4021 closed defect (fixed)

No more access to LAN iface when change MAC...

Reported by: anonymous Owned by: developers
Priority: high Milestone: Barrier Breaker 14.07
Component: kernel Version:
Keywords: Cc:

Description

I recently built a new image of Kamikaze based on the last sources from svn.openwrt.org/openwrt/kamikaze/trunk for Fonera 2100..
Kernel 2.6.26.3. I tried to change MAC address of my eth0. I tried two ways...
First of them...
ifconfig eth0 down
ifconfig eth0 hw ether XX:XX...
ifconfig eth0 up

The second one...
/etc/config/network
option macaddr XX:XX

and when i restart the interface /etc/init.d/networking restart the interface crashes.No more ping,no more ssh,no more telnet..only serial access.The interface is UP!!! And when i change the MAC with the original,everything is fine-perfect ping,ssh,telnet and etc.No other MAC address want to work. Where did i wrong? May be with the image building...HELP plsss...

Attachments (0)

Change History (4)

comment:1 Changed 8 years ago by anonymous

I also try to execute a script - There si no change:
root@OpenWrt:/# ifconfig eth0 up
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
root@OpenWrt:/# br-lan: port 1(eth0) entering disabled state
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
br-lan: port 1(eth0) entering disabled state
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
br-lan: port 1(eth0) entering disabled state
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
br-lan: port 1(eth0) entering disabled state
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
br-lan: port 1(eth0) entering disabled state
device eth0 left promiscuous mode
br-lan: port 1(eth0) entering disabled state
device eth0 entered promiscuous mode
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state

ifconfig: SIOCSIFHWADDR: Cannot assign requested address

Why??

The script is:
ifdown -a
ifconfig eth0 hw ether XX:XX...
ifup -a

I tried to type it manualy...the mac address is changed,but i still don't have ping from the other computer to the router.The router IP is 192.168.1.1 , The computer IP is 192.168.1.2.
There are 2 iface-s ETH0 and br-lan.When i change eth0 MAC's,the br-lan mac's is changing too.And when i ping the computer from linux console,the ping Computer->Router Appears. What's going on?!?!?

comment:2 Changed 8 years ago by openwrt.org@…

Spotted this aswell, my cablemodem is locked against a MAC adress, so I've always relied on the MAC spoofing in the OpenWRT firmwares. My router is a WRT54GS v1.1, and installed: http://downloads.openwrt.org/kamikaze/8.09_RC1/brcm-2.4/openwrt-brcm-2.4-squashfs.trx

I was using an older snapshot (only file I spot on my drive is from October 13th) and there 'macaddr' works just as expected. After the upgrade to 8.09 RC1 it would seem it no longer bites.

Looking at /lib/network/config.sh it would seem that everything is fine. I'm theorizing that the interface is already in up state when this code is executed. I'm also guessing that downing the interface just before would work around whatever issue has cropped up in the past few weeks.

I've purged my settings in /etc/config while trying to figure out the problem.

My current workaround is to ssh to the router after it has been powerd on and then

ifconfig eth0.1 down
ifconfig eth0.1 hw ether 00:11:22:33:44:55
/etc/init.d/network restart

This works until the next time I have to reboot the router.

comment:3 Changed 8 years ago by jow

  • Resolution set to fixed
  • Status changed from new to closed

should be fixed with r13258, r13720 and later commits

comment:4 Changed 2 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.