Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 396427 - macvlan net module fails if macvlan is built into the kernel (not a module)
Summary: macvlan net module fails if macvlan is built into the kernel (not a module)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: OpenRC Team
URL:
Whiteboard: openrc:oldnet
Keywords:
Depends on:
Blocks: openrc-tracker
  Show dependency tree
 
Reported: 2011-12-29 16:42 UTC by Marien Zwart (RETIRED)
Modified: 2013-04-25 23:08 UTC (History)
0 users

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


Attachments
remove-check-macvlan.patch (remove-check-macvlan.patch,765 bytes, text/plain)
2011-12-29 17:00 UTC, William Hubbs
Details

Note You need to log in before you can comment on or make changes to this bug.
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.