Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
48095dd4
Unverified
Commit
48095dd4
authored
Aug 19, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macro: add macvlan properties
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
3991c6f9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
21 deletions
+23
-21
confile_utils.c
src/lxc/confile_utils.c
+5
-5
confile_utils.h
src/lxc/confile_utils.h
+2
-16
macro.h
src/lxc/macro.h
+16
-0
No files found.
src/lxc/confile_utils.c
View file @
48095dd4
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include "list.h"
#include "list.h"
#include "log.h"
#include "log.h"
#include "lxccontainer.h"
#include "lxccontainer.h"
#include "macro.h"
#include "network.h"
#include "network.h"
#include "parse.h"
#include "parse.h"
#include "utils.h"
#include "utils.h"
...
@@ -288,13 +289,12 @@ void lxc_log_configured_netdevs(const struct lxc_conf *conf)
...
@@ -288,13 +289,12 @@ void lxc_log_configured_netdevs(const struct lxc_conf *conf)
TRACE
(
"type: macvlan"
);
TRACE
(
"type: macvlan"
);
if
(
netdev
->
priv
.
macvlan_attr
.
mode
>
0
)
{
if
(
netdev
->
priv
.
macvlan_attr
.
mode
>
0
)
{
char
*
m
acvlan_m
ode
;
char
*
mode
;
m
acvlan_m
ode
=
lxc_macvlan_flag_to_mode
(
mode
=
lxc_macvlan_flag_to_mode
(
netdev
->
priv
.
macvlan_attr
.
mode
);
netdev
->
priv
.
macvlan_attr
.
mode
);
TRACE
(
"macvlan mode: %s"
,
TRACE
(
"macvlan mode: %s"
,
macvlan_mode
?
macvlan_mode
mode
?
mode
:
"(invalid mode)"
);
:
"(invalid mode)"
);
}
}
break
;
break
;
case
LXC_NET_VLAN
:
case
LXC_NET_VLAN
:
...
@@ -442,7 +442,7 @@ void lxc_free_networks(struct lxc_list *networks)
...
@@ -442,7 +442,7 @@ void lxc_free_networks(struct lxc_list *networks)
lxc_list_init
(
networks
);
lxc_list_init
(
networks
);
}
}
static
struct
macvlan_mode
{
static
struct
lxc_
macvlan_mode
{
char
*
name
;
char
*
name
;
int
mode
;
int
mode
;
}
macvlan_mode
[]
=
{
}
macvlan_mode
[]
=
{
...
...
src/lxc/confile_utils.h
View file @
48095dd4
...
@@ -20,27 +20,13 @@
...
@@ -20,27 +20,13 @@
#ifndef __LXC_CONFILE_UTILS_H
#ifndef __LXC_CONFILE_UTILS_H
#define __LXC_CONFILE_UTILS_H
#define __LXC_CONFILE_UTILS_H
#include "config.h"
#include <stdbool.h>
#include <stdbool.h>
#include "conf.h"
#include "conf.h"
#include "confile_utils.h"
#include "confile_utils.h"
#ifndef MACVLAN_MODE_PRIVATE
#define MACVLAN_MODE_PRIVATE 1
#endif
#ifndef MACVLAN_MODE_VEPA
#define MACVLAN_MODE_VEPA 2
#endif
#ifndef MACVLAN_MODE_BRIDGE
#define MACVLAN_MODE_BRIDGE 4
#endif
#ifndef MACVLAN_MODE_PASSTHRU
#define MACVLAN_MODE_PASSTHRU 8
#endif
#define strprint(str, inlen, ...) \
#define strprint(str, inlen, ...) \
do { \
do { \
if (str) \
if (str) \
...
...
src/lxc/macro.h
View file @
48095dd4
...
@@ -197,6 +197,22 @@ extern int __build_bug_on_failed;
...
@@ -197,6 +197,22 @@ extern int __build_bug_on_failed;
#define NLMSG_ERROR 0x2
#define NLMSG_ERROR 0x2
#endif
#endif
#ifndef MACVLAN_MODE_PRIVATE
#define MACVLAN_MODE_PRIVATE 1
#endif
#ifndef MACVLAN_MODE_VEPA
#define MACVLAN_MODE_VEPA 2
#endif
#ifndef MACVLAN_MODE_BRIDGE
#define MACVLAN_MODE_BRIDGE 4
#endif
#ifndef MACVLAN_MODE_PASSTHRU
#define MACVLAN_MODE_PASSTHRU 8
#endif
/* mount */
/* mount */
#ifndef MS_REC
#ifndef MS_REC
#define MS_REC 16384
#define MS_REC 16384
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment