$ sudo macchanger -r enp4s0 Current MAC: 56:a0:9a:7b:ec:5d (unknown) Permanent MAC: 90:2b:34:a8:2a:14 (GIGA-BYTE TECHNOLOGY CO.,LTD.) New MAC: 56:a0:9a:7b:ec:5d (unknown) It's the same MAC!! Subsequent macchanger runs do not change the MAC address $ sudo macchanger -r enp4s0 Current MAC: 56:a0:9a:7b:ec:5d (unknown) Permanent MAC: 90:2b:34:a8:2a:14 (GIGA-BYTE TECHNOLOGY CO.,LTD.) New MAC: 56:a0:9a:7b:ec:5d (unknown) It's the same MAC!! $ sudo macchanger -r enp4s0 Current MAC: 56:a0:9a:7b:ec:5d (unknown) Permanent MAC: 90:2b:34:a8:2a:14 (GIGA-BYTE TECHNOLOGY CO.,LTD.) New MAC: 56:a0:9a:7b:ec:5d (unknown) It's the same MAC!! if you compile net-analyzer/macchanger with the -O0 option, the problem goes away There is a precedence for "-O2" x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DLISTDIR="\"/lib/macchanger\"" -O2 -march=native -s -pipe -c -o main.o main.c main.c: In function ‘random_seed’: main.c:101:3: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result] 101 | read (fd, &seed, sizeof(seed)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reproducible: Always
is it linked to https://github.com/alobbs/macchanger/issues/57 ? Please paste your emerge info here.
(In reply to Jonas Stein from comment #1) > is it linked to > https://github.com/alobbs/macchanger/issues/57 ? > > Please paste your emerge info here. new issue https://github.com/alobbs/macchanger/issues/58
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63fd00c44388c3e96b0c8c03cf34af0cacb92eb7 commit 63fd00c44388c3e96b0c8c03cf34af0cacb92eb7 Author: Jeroen Roovers <jer@gentoo.org> AuthorDate: 2019-12-03 09:50:36 +0000 Commit: Jeroen Roovers <jer@gentoo.org> CommitDate: 2019-12-03 10:08:28 +0000 net-analyzer/macchanger: Version 1.7.0_p5_p4 Package-Manager: Portage-2.3.80, Repoman-2.3.19 Bug: https://bugs.gentoo.org/699744 Signed-off-by: Jeroen Roovers <jer@gentoo.org> net-analyzer/macchanger/Manifest | 1 + .../macchanger/macchanger-1.7.0_p5_p4.ebuild | 44 ++++++++++++++++++++++ 2 files changed, 45 insertions(+)
Please test.
the error remained CFLAGS="-O2 -march=native -s -pipe" emerge net-analyzer/macchanger main.c:101:3: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result] 101 | read (fd, &seed, sizeof(seed)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ $ macchanger -r enp4s0 Current MAC: 90:2b:34:a8:2a:14 (GIGA-BYTE TECHNOLOGY CO.,LTD.) Permanent MAC: 90:2b:34:a8:2a:14 (GIGA-BYTE TECHNOLOGY CO.,LTD.) New MAC: 56:a0:9a:7b:ec:5d (unknown) $ macchanger -r enp4s0 Current MAC: 56:a0:9a:7b:ec:5d (unknown) Permanent MAC: 90:2b:34:a8:2a:14 (GIGA-BYTE TECHNOLOGY CO.,LTD.) New MAC: 56:a0:9a:7b:ec:5d (unknown) It's the same MAC!! $ macchanger -r enp4s0 Current MAC: 56:a0:9a:7b:ec:5d (unknown) Permanent MAC: 90:2b:34:a8:2a:14 (GIGA-BYTE TECHNOLOGY CO.,LTD.) New MAC: 56:a0:9a:7b:ec:5d (unknown) It's the same MAC!! if you compile net-analyzer/macchanger with the -O0 option, the problem goes away CFLAGS="-O0 -march=native -s -pipe" emerge net-analyzer/macchanger -av $ macchanger -r enp4s0 Current MAC: 56:a0:9a:7b:ec:5d (unknown) Permanent MAC: 90:2b:34:a8:2a:14 (GIGA-BYTE TECHNOLOGY CO.,LTD.) New MAC: c2:26:4a:53:41:7f (unknown) $ macchanger -r enp4s0 Current MAC: c2:26:4a:53:41:7f (unknown) Permanent MAC: 90:2b:34:a8:2a:14 (GIGA-BYTE TECHNOLOGY CO.,LTD.) New MAC: f6:44:fe:ac:dd:fc (unknown) $ macchanger -r enp4s0 Current MAC: f6:44:fe:ac:dd:fc (unknown) Permanent MAC: 90:2b:34:a8:2a:14 (GIGA-BYTE TECHNOLOGY CO.,LTD.) New MAC: 56:a7:57:19:15:20 (unknown)
in version 1.7.0_p5_p4 everything works well