Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iproute2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
iproute2
Commits
2eb90dc7
Commit
2eb90dc7
authored
Jan 15, 2015
by
Thomas Graf
Committed by
Stephen Hemminger
Feb 05, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vxlan: Group policy extension
Signed-off-by:
Thomas Graf
<
tgraf@suug.ch
>
parent
8c58d403
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
0 deletions
+56
-0
ip/iplink_vxlan.c
ip/iplink_vxlan.c
+11
-0
man/man8/ip-link.8.in
man/man8/ip-link.8.in
+45
-0
No files found.
ip/iplink_vxlan.c
View file @
2eb90dc7
...
@@ -30,6 +30,7 @@ static void print_explain(FILE *f)
...
@@ -30,6 +30,7 @@ static void print_explain(FILE *f)
fprintf
(
f
,
" [ [no]l2miss ] [ [no]l3miss ]
\n
"
);
fprintf
(
f
,
" [ [no]l2miss ] [ [no]l3miss ]
\n
"
);
fprintf
(
f
,
" [ ageing SECONDS ] [ maxaddress NUMBER ]
\n
"
);
fprintf
(
f
,
" [ ageing SECONDS ] [ maxaddress NUMBER ]
\n
"
);
fprintf
(
f
,
" [ [no]udpcsum ] [ [no]udp6zerocsumtx ] [ [no]udp6zerocsumrx ]
\n
"
);
fprintf
(
f
,
" [ [no]udpcsum ] [ [no]udp6zerocsumtx ] [ [no]udp6zerocsumrx ]
\n
"
);
fprintf
(
f
,
" [ gbp ]
\n
"
);
fprintf
(
f
,
"
\n
"
);
fprintf
(
f
,
"
\n
"
);
fprintf
(
f
,
"Where: VNI := 0-16777215
\n
"
);
fprintf
(
f
,
"Where: VNI := 0-16777215
\n
"
);
fprintf
(
f
,
" ADDR := { IP_ADDRESS | any }
\n
"
);
fprintf
(
f
,
" ADDR := { IP_ADDRESS | any }
\n
"
);
...
@@ -68,6 +69,7 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv,
...
@@ -68,6 +69,7 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv,
__u8
udpcsum
=
0
;
__u8
udpcsum
=
0
;
__u8
udp6zerocsumtx
=
0
;
__u8
udp6zerocsumtx
=
0
;
__u8
udp6zerocsumrx
=
0
;
__u8
udp6zerocsumrx
=
0
;
__u8
gbp
=
0
;
int
dst_port_set
=
0
;
int
dst_port_set
=
0
;
struct
ifla_vxlan_port_range
range
=
{
0
,
0
};
struct
ifla_vxlan_port_range
range
=
{
0
,
0
};
...
@@ -197,6 +199,8 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv,
...
@@ -197,6 +199,8 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv,
udp6zerocsumrx
=
1
;
udp6zerocsumrx
=
1
;
}
else
if
(
!
matches
(
*
argv
,
"noudp6zerocsumrx"
))
{
}
else
if
(
!
matches
(
*
argv
,
"noudp6zerocsumrx"
))
{
udp6zerocsumrx
=
0
;
udp6zerocsumrx
=
0
;
}
else
if
(
!
matches
(
*
argv
,
"gbp"
))
{
gbp
=
1
;
}
else
if
(
matches
(
*
argv
,
"help"
)
==
0
)
{
}
else
if
(
matches
(
*
argv
,
"help"
)
==
0
)
{
explain
();
explain
();
return
-
1
;
return
-
1
;
...
@@ -268,6 +272,10 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv,
...
@@ -268,6 +272,10 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv,
if
(
dstport
)
if
(
dstport
)
addattr16
(
n
,
1024
,
IFLA_VXLAN_PORT
,
htons
(
dstport
));
addattr16
(
n
,
1024
,
IFLA_VXLAN_PORT
,
htons
(
dstport
));
if
(
gbp
)
addattr_l
(
n
,
1024
,
IFLA_VXLAN_GBP
,
NULL
,
0
);
return
0
;
return
0
;
}
}
...
@@ -398,6 +406,9 @@ static void vxlan_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
...
@@ -398,6 +406,9 @@ static void vxlan_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
if
(
tb
[
IFLA_VXLAN_UDP_ZERO_CSUM6_RX
]
&&
if
(
tb
[
IFLA_VXLAN_UDP_ZERO_CSUM6_RX
]
&&
rta_getattr_u8
(
tb
[
IFLA_VXLAN_UDP_ZERO_CSUM6_RX
]))
rta_getattr_u8
(
tb
[
IFLA_VXLAN_UDP_ZERO_CSUM6_RX
]))
fputs
(
"udp6zerocsumrx "
,
f
);
fputs
(
"udp6zerocsumrx "
,
f
);
if
(
tb
[
IFLA_VXLAN_GBP
])
fputs
(
"gbp "
,
f
);
}
}
static
void
vxlan_print_help
(
struct
link_util
*
lu
,
int
argc
,
char
**
argv
,
static
void
vxlan_print_help
(
struct
link_util
*
lu
,
int
argc
,
char
**
argv
,
...
...
man/man8/ip-link.8.in
View file @
2eb90dc7
...
@@ -276,6 +276,8 @@ the following additional arguments are supported:
...
@@ -276,6 +276,8 @@ the following additional arguments are supported:
.BI ageing " SECONDS "
.BI ageing " SECONDS "
.R " ] [ "
.R " ] [ "
.BI maxaddress " NUMBER "
.BI maxaddress " NUMBER "
.R " ] [ "
.B gbp
.R " ]"
.R " ]"
.in +8
.in +8
...
@@ -348,6 +350,49 @@ are entered into the VXLAN device forwarding database.
...
@@ -348,6 +350,49 @@ are entered into the VXLAN device forwarding database.
.BI maxaddress " NUMBER"
.BI maxaddress " NUMBER"
- specifies the maximum number of FDB entries.
- specifies the maximum number of FDB entries.
.sp
.B gbp
- enables the Group Policy extension (VXLAN-GBP).
.in +4
Allows to transport group policy context across VXLAN network peers.
If enabled, includes the mark of a packet in the VXLAN header for outgoing
packets and fills the packet mark based on the information found in the
VXLAN header for incomming packets.
Format of upper 16 bits of packet mark (flags);
.in +2
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
.br
|-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
.br
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
.B D :=
Don't Learn bit. When set, this bit indicates that the egress
VTEP MUST NOT learn the source address of the encapsulated frame.
.B A :=
Indicates that the group policy has already been applied to
this packet. Policies MUST NOT be applied by devices when the A bit is set.
.in -2
Format of lower 16 bits of packet mark (policy ID):
.in +2
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
.br
| Group Policy ID |
.br
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
.in -2
Example:
iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF
.in -4
.in -8
.in -8
.TP
.TP
...
...
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