diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-08-04 20:39:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-04 20:39:57 +0200 |
commit | 80edac2090c56a72ee731f9c61ecb53d3abcb541 (patch) | |
tree | f4b80e8e2ef0f5571325dfbfa033faad30c19288 /src/network/networkd-brvlan.c | |
parent | eb18df724ba541ac1c7fd5c77d9244fa6bc5cabf (diff) | |
parent | ffff9abe1d4dc61d6f9a47ce0f3f85a3854373cf (diff) |
Merge pull request #3892 from toanju/fix-brvlan-error-on-normal-bridge
networkd: apply bridge vlan configuration correct
Diffstat (limited to 'src/network/networkd-brvlan.c')
-rw-r--r-- | src/network/networkd-brvlan.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c index 8bc330ebae..18ecd86858 100644 --- a/src/network/networkd-brvlan.c +++ b/src/network/networkd-brvlan.c @@ -257,6 +257,24 @@ static int parse_vid_range(const char *rvalue, uint16_t *vid, uint16_t *vid_end) return r; } +int config_parse_brvlan_pvid(const char *unit, const char *filename, + unsigned line, const char *section, + unsigned section_line, const char *lvalue, + int ltype, const char *rvalue, void *data, + void *userdata) { + Network *network = userdata; + int r; + uint16_t pvid; + r = parse_vlanid(rvalue, &pvid); + if (r < 0) + return r; + + network->pvid = pvid; + network->use_br_vlan = true; + + return 0; +} + int config_parse_brvlan_vlan(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, @@ -288,6 +306,7 @@ int config_parse_brvlan_vlan(const char *unit, const char *filename, for (; vid <= vid_end; vid++) set_bit(vid, network->br_vid_bitmap); } + network->use_br_vlan = true; return 0; } @@ -325,5 +344,6 @@ int config_parse_brvlan_untagged(const char *unit, const char *filename, set_bit(vid, network->br_untagged_bitmap); } } + network->use_br_vlan = true; return 0; } |