Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 691372 - net-misc/netifrc udev_helper/net.sh should ignore macvtap interfaces
Summary: net-misc/netifrc udev_helper/net.sh should ignore macvtap interfaces
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: netifrc Team
URL: https://github.com/gentoo/netifrc/pul...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-04 01:44 UTC by Paul B. Henson
Modified: 2021-04-05 20:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul B. Henson 2019-08-04 01:44:25 UTC
I run vm's under qemu/kvm, and noticed lots of messages like these popping up in the logs:

    1: kernel: Process 'net.sh macvtap3 stop' failed with exit code 1.          
    1: kernel: Process 'net.sh macvtap6 stop' failed with exit code 1.          

    1: kernel: Process 'net.sh macvtap8 start' failed with exit code 1.          
    1: kernel: Process 'net.sh macvtap9 start' failed with exit code 1.          

I tracked it down to the /lib/udev/net.sh installed by netifcr, specifically:

is_service_enabled() {
        local svc="$1"
        [ ! -e "/etc/init.d/${svc}" ] && return 1
        [ -e "/etc/runlevels/boot/${svc}" ] && return 0
        [ -e "/etc/runlevels/default/${svc}" ] && return 0
        [ -e "/etc/runlevels/sysinit/${svc}" ] && return 0
        return 1
}

The macvtap interfaces created by qemu don't have init scripts, so this udev helper script always fails 8-/. It seems this code:

# ignore interfaces that are registered after being "up" (?)
case ${IFACE} in
        ppp*|ippp*|isdn*|plip*|lo*|irda*|dummy*|ipsec*|tun*|tap*|br*)
                exit 0 ;;
esac

should be extended to include 'macvtap*'?
Comment 1 Paul B. Henson 2020-05-28 04:59:43 UTC
Any thoughts on this?
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2020-05-31 05:09:38 UTC
Pending merging https://github.com/gentoo/netifrc/pull/32
Would appreciate if you tested that.
Comment 3 Larry the Git Cow gentoo-dev 2020-05-31 23:21:21 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=db98502979abd91749cdede8e096fe3b814441a7

commit db98502979abd91749cdede8e096fe3b814441a7
Author:     Robin H. Johnson <robbat2@gentoo.org>
AuthorDate: 2020-05-31 23:20:59 +0000
Commit:     Robin H. Johnson <robbat2@gentoo.org>
CommitDate: 2020-05-31 23:20:59 +0000

    udev_helper: recognize more interface types
    
    Bug: https://bugs.gentoo.org/691372
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

 udev_helper/net.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=ffa5a9e830c609fec987efac5723781e889ae67c

commit ffa5a9e830c609fec987efac5723781e889ae67c
Author:     Arseni Nimera <shorrer@yandex.by>
AuthorDate: 2020-05-30 22:20:25 +0000
Commit:     Robin H. Johnson <robbat2@gentoo.org>
CommitDate: 2020-05-31 23:15:20 +0000

    Added macvtap support
    
    Bug: https://bugs.gentoo.org/691372
    Signed-off-by: Arseni Nimera <shorrer@yandex.by>
    (cherry picked from commit 0dc79645173fad82e0d437a6569b7ea7fa356197)
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

 doc/net.example.Linux.in | 3 +++
 net/macvlan.sh           | 8 ++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2020-06-02 21:25:52 UTC
Please test netifrc master with commit db98502979abd91749cdede8e096fe3b814441a7
Comment 5 Larry the Git Cow gentoo-dev 2021-04-05 20:02:15 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=0dc79645173fad82e0d437a6569b7ea7fa356197

commit 0dc79645173fad82e0d437a6569b7ea7fa356197
Author:     Arseni Nimera <shorrer@yandex.by>
AuthorDate: 2020-05-30 22:20:25 +0000
Commit:     Arseni Nimera <shorrer@yandex.by>
CommitDate: 2020-05-31 07:28:27 +0000

    Added macvtap support
    
    Bug: https://bugs.gentoo.org/691372
    Signed-off-by: Arseni Nimera <shorrer@yandex.by>

 doc/net.example.Linux.in | 3 +++
 net/macvlan.sh           | 8 ++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)