]> git.ipfire.org Git - thirdparty/systemd.git/commit
network: add support for MACVLAN source mode 16405/head
authorAlvin Šipraga <alsi@bang-olufsen.dk>
Wed, 8 Jul 2020 13:52:23 +0000 (15:52 +0200)
committerAlvin Šipraga <alsi@bang-olufsen.dk>
Wed, 8 Jul 2020 16:01:52 +0000 (18:01 +0200)
commit0d0de133f04d3870273970cfa4d61aac1ae06098
tree911c536fc8cebdb40cb85b787641057c54e568f4
parent24e2494407cb5a88ee81fc238195687e5e0b8a09
network: add support for MACVLAN source mode

Add support for creating a MACVLAN interface in "source" mode by
specifying Mode=source in the [MACVLAN] section of a .netdev file.

A list of allowed MAC addresses for the corresponding MACVLAN can also
be specified with the SourceMACAddress= option of the [MACVLAN] section.

An example .netdev file:

    [NetDev]
    Name=macvlan0
    Kind=macvlan
    MACAddress=02:DE:AD:BE:EF:00

    [MACVLAN]
    Mode=source
    SourceMACAddress=02:AB:AB:AB:AB:01 02:CD:CD:CD:CD:01
    SourceMACAddress=02:EF:EF:EF:EF:01

The same keys can also be specified in [MACVTAP] for MACVTAP kinds of
interfaces, with the same semantics.
man/systemd.netdev.xml
src/libsystemd/sd-netlink/netlink-types.c
src/network/netdev/macvlan.c
src/network/netdev/macvlan.h
src/network/netdev/netdev-gperf.gperf
src/shared/macvlan-util.c
src/shared/macvlan-util.h
test/fuzz/fuzz-netdev-parser/directives.netdev