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
9ecf3da9
Commit
9ecf3da9
authored
Feb 21, 2016
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into net-next
parents
1a6b1aa6
8a4cd394
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
32 deletions
+37
-32
bridge/fdb.c
bridge/fdb.c
+4
-1
ip/iplink_bridge.c
ip/iplink_bridge.c
+20
-30
man/man8/bridge.8
man/man8/bridge.8
+13
-1
No files found.
bridge/fdb.c
View file @
9ecf3da9
...
...
@@ -33,7 +33,7 @@ static void usage(void)
{
fprintf
(
stderr
,
"Usage: bridge fdb { add | append | del | replace } ADDR dev DEV
\n
"
" [ self ] [ master ] [ use ] [ router ]
\n
"
" [ local |
temp | stat
ic ] [ dst IPADDR ] [ vlan VID ]
\n
"
" [ local |
static | dynam
ic ] [ dst IPADDR ] [ vlan VID ]
\n
"
" [ port PORT] [ vni VNI ] [ via DEV ]
\n
"
);
fprintf
(
stderr
,
" bridge fdb [ show [ br BRDEV ] [ brport DEV ] ]
\n
"
);
exit
(
-
1
);
...
...
@@ -304,6 +304,9 @@ static int fdb_modify(int cmd, int flags, int argc, char **argv)
}
else
if
(
matches
(
*
argv
,
"temp"
)
==
0
||
matches
(
*
argv
,
"static"
)
==
0
)
{
req
.
ndm
.
ndm_state
|=
NUD_REACHABLE
;
}
else
if
(
matches
(
*
argv
,
"dynamic"
)
==
0
)
{
req
.
ndm
.
ndm_state
|=
NUD_REACHABLE
;
req
.
ndm
.
ndm_state
&=
~
NUD_NOARP
;
}
else
if
(
matches
(
*
argv
,
"vlan"
)
==
0
)
{
if
(
vid
>=
0
)
duparg2
(
"vlan"
,
*
argv
);
...
...
ip/iplink_bridge.c
View file @
9ecf3da9
...
...
@@ -116,19 +116,17 @@ static int bridge_parse_opt(struct link_util *lu, int argc, char **argv,
__u8
vlan_filter
;
NEXT_ARG
();
if
(
get_u8
(
&
vlan_filter
,
*
argv
,
0
))
{
if
(
get_u8
(
&
vlan_filter
,
*
argv
,
0
))
invarg
(
"invalid vlan_filtering"
,
*
argv
);
return
-
1
;
}
addattr8
(
n
,
1024
,
IFLA_BR_VLAN_FILTERING
,
vlan_filter
);
}
else
if
(
matches
(
*
argv
,
"vlan_protocol"
)
==
0
)
{
__u16
vlan_proto
;
NEXT_ARG
();
if
(
ll_proto_a2n
(
&
vlan_proto
,
*
argv
))
{
if
(
ll_proto_a2n
(
&
vlan_proto
,
*
argv
))
invarg
(
"invalid vlan_protocol"
,
*
argv
);
return
-
1
;
}
addattr16
(
n
,
1024
,
IFLA_BR_VLAN_PROTOCOL
,
vlan_proto
);
}
else
if
(
matches
(
*
argv
,
"group_fwd_mask"
)
==
0
)
{
__u16
fwd_mask
;
...
...
@@ -243,85 +241,77 @@ static int bridge_parse_opt(struct link_util *lu, int argc, char **argv,
__u64
mcast_membership_intvl
;
NEXT_ARG
();
if
(
get_u64
(
&
mcast_membership_intvl
,
*
argv
,
0
))
{
if
(
get_u64
(
&
mcast_membership_intvl
,
*
argv
,
0
))
invarg
(
"invalid mcast_membership_interval"
,
*
argv
);
return
-
1
;
}
addattr64
(
n
,
1024
,
IFLA_BR_MCAST_MEMBERSHIP_INTVL
,
mcast_membership_intvl
);
}
else
if
(
matches
(
*
argv
,
"mcast_querier_interval"
)
==
0
)
{
__u64
mcast_querier_intvl
;
NEXT_ARG
();
if
(
get_u64
(
&
mcast_querier_intvl
,
*
argv
,
0
))
{
if
(
get_u64
(
&
mcast_querier_intvl
,
*
argv
,
0
))
invarg
(
"invalid mcast_querier_interval"
,
*
argv
);
return
-
1
;
}
addattr64
(
n
,
1024
,
IFLA_BR_MCAST_QUERIER_INTVL
,
mcast_querier_intvl
);
}
else
if
(
matches
(
*
argv
,
"mcast_query_interval"
)
==
0
)
{
__u64
mcast_query_intvl
;
NEXT_ARG
();
if
(
get_u64
(
&
mcast_query_intvl
,
*
argv
,
0
))
{
if
(
get_u64
(
&
mcast_query_intvl
,
*
argv
,
0
))
invarg
(
"invalid mcast_query_interval"
,
*
argv
);
return
-
1
;
}
addattr64
(
n
,
1024
,
IFLA_BR_MCAST_QUERY_INTVL
,
mcast_query_intvl
);
}
else
if
(
!
matches
(
*
argv
,
"mcast_query_response_interval"
))
{
__u64
mcast_query_resp_intvl
;
NEXT_ARG
();
if
(
get_u64
(
&
mcast_query_resp_intvl
,
*
argv
,
0
))
{
if
(
get_u64
(
&
mcast_query_resp_intvl
,
*
argv
,
0
))
invarg
(
"invalid mcast_query_response_interval"
,
*
argv
);
return
-
1
;
}
addattr64
(
n
,
1024
,
IFLA_BR_MCAST_QUERY_RESPONSE_INTVL
,
mcast_query_resp_intvl
);
}
else
if
(
!
matches
(
*
argv
,
"mcast_startup_query_interval"
))
{
__u64
mcast_startup_query_intvl
;
NEXT_ARG
();
if
(
get_u64
(
&
mcast_startup_query_intvl
,
*
argv
,
0
))
{
if
(
get_u64
(
&
mcast_startup_query_intvl
,
*
argv
,
0
))
invarg
(
"invalid mcast_startup_query_interval"
,
*
argv
);
return
-
1
;
}
addattr64
(
n
,
1024
,
IFLA_BR_MCAST_STARTUP_QUERY_INTVL
,
mcast_startup_query_intvl
);
}
else
if
(
matches
(
*
argv
,
"nf_call_iptables"
)
==
0
)
{
__u8
nf_call_ipt
;
NEXT_ARG
();
if
(
get_u8
(
&
nf_call_ipt
,
*
argv
,
0
))
{
if
(
get_u8
(
&
nf_call_ipt
,
*
argv
,
0
))
invarg
(
"invalid nf_call_iptables"
,
*
argv
);
return
-
1
;
}
addattr8
(
n
,
1024
,
IFLA_BR_NF_CALL_IPTABLES
,
nf_call_ipt
);
}
else
if
(
matches
(
*
argv
,
"nf_call_ip6tables"
)
==
0
)
{
__u8
nf_call_ip6t
;
NEXT_ARG
();
if
(
get_u8
(
&
nf_call_ip6t
,
*
argv
,
0
))
{
if
(
get_u8
(
&
nf_call_ip6t
,
*
argv
,
0
))
invarg
(
"invalid nf_call_ip6tables"
,
*
argv
);
return
-
1
;
}
addattr8
(
n
,
1024
,
IFLA_BR_NF_CALL_IP6TABLES
,
nf_call_ip6t
);
}
else
if
(
matches
(
*
argv
,
"nf_call_arptables"
)
==
0
)
{
__u8
nf_call_arpt
;
NEXT_ARG
();
if
(
get_u8
(
&
nf_call_arpt
,
*
argv
,
0
))
{
if
(
get_u8
(
&
nf_call_arpt
,
*
argv
,
0
))
invarg
(
"invalid nf_call_arptables"
,
*
argv
);
return
-
1
;
}
addattr8
(
n
,
1024
,
IFLA_BR_NF_CALL_ARPTABLES
,
nf_call_arpt
);
}
else
if
(
matches
(
*
argv
,
"help"
)
==
0
)
{
...
...
man/man8/bridge.8
View file @
9ecf3da9
...
...
@@ -54,7 +54,7 @@ bridge \- show / manipulate bridge addresses and devices
.I LLADDR
.B dev
.IR DEV " { "
.BR local " | "
temp
" } [ "
.BR local " | "
static " | " dynamic
" } [ "
.BR self " ] [ " master " ] [ " router " ] [ " use " ] [ "
.B dst
.IR IPADDR " ] [ "
...
...
@@ -338,6 +338,18 @@ the Ethernet MAC address.
.BI dev " DEV"
the interface to which this address is associated.
.B local
- is a local permanent fdb entry
.sp
.B static
- is a static (no arp) fdb entry
.sp
.B dynamic
- is a dynamic reachable age-able fdb entry
.sp
.B self
- the address is associated with the port drivers fdb. Usually hardware.
.sp
...
...
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