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
4b942cb1
Commit
4b942cb1
authored
Aug 12, 2015
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into net-next
parents
e4a852f8
e543a6a8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
10 deletions
+34
-10
ip/iplink.c
ip/iplink.c
+2
-2
ip/iplink_bridge.c
ip/iplink_bridge.c
+14
-2
ip/iplink_bridge_slave.c
ip/iplink_bridge_slave.c
+14
-2
ip/ipnetns.c
ip/ipnetns.c
+3
-3
man/man8/ip-link.8.in
man/man8/ip-link.8.in
+1
-1
No files found.
ip/iplink.c
View file @
4b942cb1
...
@@ -94,7 +94,7 @@ void iplink_usage(void)
...
@@ -94,7 +94,7 @@ void iplink_usage(void)
fprintf
(
stderr
,
"TYPE := { vlan | veth | vcan | dummy | ifb | macvlan | macvtap |
\n
"
);
fprintf
(
stderr
,
"TYPE := { vlan | veth | vcan | dummy | ifb | macvlan | macvtap |
\n
"
);
fprintf
(
stderr
,
" bridge | bond | ipoib | ip6tnl | ipip | sit | vxlan |
\n
"
);
fprintf
(
stderr
,
" bridge | bond | ipoib | ip6tnl | ipip | sit | vxlan |
\n
"
);
fprintf
(
stderr
,
" gre | gretap | ip6gre | ip6gretap | vti | nlmon |
\n
"
);
fprintf
(
stderr
,
" gre | gretap | ip6gre | ip6gretap | vti | nlmon |
\n
"
);
fprintf
(
stderr
,
" bond_slave | ipvlan | geneve }
\n
"
);
fprintf
(
stderr
,
" bond_slave | ipvlan | geneve
| bridge_slave
}
\n
"
);
}
}
exit
(
-
1
);
exit
(
-
1
);
}
}
...
@@ -508,7 +508,7 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
...
@@ -508,7 +508,7 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
}
else
if
(
strcmp
(
*
argv
,
"off"
)
==
0
)
{
}
else
if
(
strcmp
(
*
argv
,
"off"
)
==
0
)
{
req
->
i
.
ifi_flags
|=
IFF_NOARP
;
req
->
i
.
ifi_flags
|=
IFF_NOARP
;
}
else
}
else
return
on_off
(
"
no
arp"
,
*
argv
);
return
on_off
(
"arp"
,
*
argv
);
}
else
if
(
strcmp
(
*
argv
,
"vf"
)
==
0
)
{
}
else
if
(
strcmp
(
*
argv
,
"vf"
)
==
0
)
{
struct
rtattr
*
vflist
;
struct
rtattr
*
vflist
;
NEXT_ARG
();
NEXT_ARG
();
...
...
ip/iplink_bridge.c
View file @
4b942cb1
...
@@ -17,9 +17,9 @@
...
@@ -17,9 +17,9 @@
#include "utils.h"
#include "utils.h"
#include "ip_common.h"
#include "ip_common.h"
static
void
explain
(
void
)
static
void
print_explain
(
FILE
*
f
)
{
{
fprintf
(
stderr
,
fprintf
(
f
,
"Usage: ... bridge [ forward_delay FORWARD_DELAY ]
\n
"
"Usage: ... bridge [ forward_delay FORWARD_DELAY ]
\n
"
" [ hello_time HELLO_TIME ]
\n
"
" [ hello_time HELLO_TIME ]
\n
"
" [ max_age MAX_AGE ]
\n
"
" [ max_age MAX_AGE ]
\n
"
...
@@ -29,6 +29,11 @@ static void explain(void)
...
@@ -29,6 +29,11 @@ static void explain(void)
);
);
}
}
static
void
explain
(
void
)
{
print_explain
(
stderr
);
}
static
int
bridge_parse_opt
(
struct
link_util
*
lu
,
int
argc
,
char
**
argv
,
static
int
bridge_parse_opt
(
struct
link_util
*
lu
,
int
argc
,
char
**
argv
,
struct
nlmsghdr
*
n
)
struct
nlmsghdr
*
n
)
{
{
...
@@ -111,9 +116,16 @@ static void bridge_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
...
@@ -111,9 +116,16 @@ static void bridge_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
rta_getattr_u32
(
tb
[
IFLA_BR_MAX_AGE
]));
rta_getattr_u32
(
tb
[
IFLA_BR_MAX_AGE
]));
}
}
static
void
bridge_print_help
(
struct
link_util
*
lu
,
int
argc
,
char
**
argv
,
FILE
*
f
)
{
print_explain
(
f
);
}
struct
link_util
bridge_link_util
=
{
struct
link_util
bridge_link_util
=
{
.
id
=
"bridge"
,
.
id
=
"bridge"
,
.
maxattr
=
IFLA_BR_MAX
,
.
maxattr
=
IFLA_BR_MAX
,
.
parse_opt
=
bridge_parse_opt
,
.
parse_opt
=
bridge_parse_opt
,
.
print_opt
=
bridge_print_opt
,
.
print_opt
=
bridge_print_opt
,
.
print_help
=
bridge_print_help
,
};
};
ip/iplink_bridge_slave.c
View file @
4b942cb1
...
@@ -19,9 +19,9 @@
...
@@ -19,9 +19,9 @@
#include "utils.h"
#include "utils.h"
#include "ip_common.h"
#include "ip_common.h"
static
void
explain
(
void
)
static
void
print_explain
(
FILE
*
f
)
{
{
fprintf
(
stderr
,
fprintf
(
f
,
"Usage: ... bridge_slave [ state STATE ] [ priority PRIO ] [cost COST ]
\n
"
"Usage: ... bridge_slave [ state STATE ] [ priority PRIO ] [cost COST ]
\n
"
" [ guard {on | off} ]
\n
"
" [ guard {on | off} ]
\n
"
" [ hairpin {on | off} ]
\n
"
" [ hairpin {on | off} ]
\n
"
...
@@ -32,6 +32,11 @@ static void explain(void)
...
@@ -32,6 +32,11 @@ static void explain(void)
);
);
}
}
static
void
explain
(
void
)
{
print_explain
(
stderr
);
}
static
const
char
*
port_states
[]
=
{
static
const
char
*
port_states
[]
=
{
[
BR_STATE_DISABLED
]
=
"disabled"
,
[
BR_STATE_DISABLED
]
=
"disabled"
,
[
BR_STATE_LISTENING
]
=
"listening"
,
[
BR_STATE_LISTENING
]
=
"listening"
,
...
@@ -172,10 +177,17 @@ static int bridge_slave_parse_opt(struct link_util *lu, int argc, char **argv,
...
@@ -172,10 +177,17 @@ static int bridge_slave_parse_opt(struct link_util *lu, int argc, char **argv,
return
0
;
return
0
;
}
}
static
void
bridge_slave_print_help
(
struct
link_util
*
lu
,
int
argc
,
char
**
argv
,
FILE
*
f
)
{
print_explain
(
f
);
}
struct
link_util
bridge_slave_link_util
=
{
struct
link_util
bridge_slave_link_util
=
{
.
id
=
"bridge"
,
.
id
=
"bridge"
,
.
maxattr
=
IFLA_BRPORT_MAX
,
.
maxattr
=
IFLA_BRPORT_MAX
,
.
print_opt
=
bridge_slave_print_opt
,
.
print_opt
=
bridge_slave_print_opt
,
.
parse_opt
=
bridge_slave_parse_opt
,
.
parse_opt
=
bridge_slave_parse_opt
,
.
print_help
=
bridge_slave_print_help
,
.
slave
=
true
,
.
slave
=
true
,
};
};
ip/ipnetns.c
View file @
4b942cb1
...
@@ -139,7 +139,7 @@ struct nsid_cache {
...
@@ -139,7 +139,7 @@ struct nsid_cache {
struct
hlist_node
nsid_hash
;
struct
hlist_node
nsid_hash
;
struct
hlist_node
name_hash
;
struct
hlist_node
name_hash
;
int
nsid
;
int
nsid
;
char
name
[
NAME_MAX
];
char
name
[
0
];
};
};
#define NSIDMAP_SIZE 128
#define NSIDMAP_SIZE 128
...
@@ -164,7 +164,7 @@ static struct nsid_cache *netns_map_get_by_nsid(int nsid)
...
@@ -164,7 +164,7 @@ static struct nsid_cache *netns_map_get_by_nsid(int nsid)
return
NULL
;
return
NULL
;
}
}
static
int
netns_map_add
(
int
nsid
,
char
*
name
)
static
int
netns_map_add
(
int
nsid
,
c
onst
c
har
*
name
)
{
{
struct
nsid_cache
*
c
;
struct
nsid_cache
*
c
;
uint32_t
h
;
uint32_t
h
;
...
@@ -172,7 +172,7 @@ static int netns_map_add(int nsid, char *name)
...
@@ -172,7 +172,7 @@ static int netns_map_add(int nsid, char *name)
if
(
netns_map_get_by_nsid
(
nsid
)
!=
NULL
)
if
(
netns_map_get_by_nsid
(
nsid
)
!=
NULL
)
return
-
EEXIST
;
return
-
EEXIST
;
c
=
malloc
(
sizeof
(
*
c
));
c
=
malloc
(
sizeof
(
*
c
)
+
strlen
(
name
)
);
if
(
c
==
NULL
)
{
if
(
c
==
NULL
)
{
perror
(
"malloc"
);
perror
(
"malloc"
);
return
-
ENOMEM
;
return
-
ENOMEM
;
...
...
man/man8/ip-link.8.in
View file @
4b942cb1
...
@@ -889,7 +889,7 @@ output more statistics about packet usage.
...
@@ -889,7 +889,7 @@ output more statistics about packet usage.
output more detailed information.
output more detailed information.
.TP
.TP
.BR "\-h", " \-human", " \-human-readble"
.BR "\-h", " \-human", " \-human-read
a
ble"
output statistics with human readable values number followed by suffix
output statistics with human readable values number followed by suffix
.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