Linux and SIOCSIFHWADDR

Alan Cox (alan@DIAMONDAGE.CYMRU.NET)
Tue, 27 May 1997 18:31:23 +0100

The following patch should nicely fix the problem allowing all users to
reconfigure downed interfaces mac addresses. Fortunately most setups
make this very hard to attack. The patch is v 2.0.30 but should apply
cleanly to all 2.0.x kernels and most 1.3 kernels. 1.2 also has this
problem. The patch won't apply directly but the change is identical.

--- net/core/dev.c~ Tue Apr 8 16:47:47 1997
+++ net/core/dev.c Tue May 27 18:16:03 1997
@@ -1427,7 +1427,6 @@
case SIOCGIFMTU:
case SIOCGIFMEM:
case SIOCGIFHWADDR:
- case SIOCSIFHWADDR:
case SIOCGIFSLAVE:
case SIOCGIFMAP:
return dev_ifsioc(arg, cmd);
@@ -1444,6 +1443,7 @@
case SIOCSIFMETRIC:
case SIOCSIFMTU:
case SIOCSIFMEM:
+ case SIOCSIFHWADDR:
case SIOCSIFMAP:
case SIOCSIFSLAVE:
case SIOCADDMULTI:

Alan