Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 396427

Summary: macvlan net module fails if macvlan is built into the kernel (not a module)
Product: Gentoo Hosted Projects Reporter: Marien Zwart (RETIRED) <marienz>
Component: OpenRCAssignee: OpenRC Team <openrc>
Status: RESOLVED FIXED    
Severity: minor    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: openrc:oldnet
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 394205    
Attachments: remove-check-macvlan.patch

Description Marien Zwart (RETIRED) gentoo-dev 2011-12-29 16:42:06 UTC
With macvlan support built into the kernel (CONFIG_MACVLAN=y in .config), running linux 3.1.x, there is no /sys/module/macvlan. This causes _check_macvlan to incorrectly decide that there is no kernel support for macvlan and bail. Commenting out the call to _check_macvlan makes the module mostly work (but see followup bug about not bringing the interface up).

Interestingly the module still works with _check_macvlan commented out, macvlan a kernel module, and the kernel module not explicitly loaded. The kernel autoloads the module when the "ip link add" command is run. The modprobe in _check_macvlan is not really necessary.

Without macvlan support the "ip link add" fails with "RTNETLINK answers: Operation not supported". If this error message is deemed sufficiently obvious just removing the check altogether should suffice.

For reference, my /etc/conf.d/net is:

config_eth0="null"

macvlan_macvlan0="eth0"
mode_macvlan0="bridge"

config_macvlan0="192.168.1.7/24"
routes_macvlan0="default via 192.168.1.254"
Comment 1 William Hubbs gentoo-dev 2011-12-29 17:00:40 UTC
Created attachment 297315 [details]
remove-check-macvlan.patch

This patch removes the _check_macvlan function.

@robbat2:
Can you test this and let me know if you have any issues?
Comment 2 William Hubbs gentoo-dev 2011-12-29 22:42:10 UTC
@robbat2:

I have tested the attached patch on this bug and the patch attached to
bug #396429. Macvlan is a module here, with kernel 3.0, and with both of
these patches, macvlan0 came up successfully.

Let me know if you want me to do anything else before I commit.
Comment 3 William Hubbs gentoo-dev 2011-12-30 00:14:35 UTC
This is fixed in commit 759f4ca.

Thanks for the report.