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
cc71ad3d
Commit
cc71ad3d
authored
Jul 16, 2013
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'net-next-3.10'
parents
ecefa08c
b37f2c89
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
0 deletions
+54
-0
ip/ipaddress.c
ip/ipaddress.c
+23
-0
ip/iplink.c
ip/iplink.c
+14
-0
ip/iproute.c
ip/iproute.c
+11
-0
man/man8/ip-route.8.in
man/man8/ip-route.8.in
+6
-0
No files found.
ip/ipaddress.c
View file @
cc71ad3d
...
...
@@ -229,6 +229,7 @@ static void print_vfinfo(FILE *fp, struct rtattr *vfinfo)
struct
ifla_vf_vlan
*
vf_vlan
;
struct
ifla_vf_tx_rate
*
vf_tx_rate
;
struct
ifla_vf_spoofchk
*
vf_spoofchk
;
struct
ifla_vf_link_state
*
vf_linkstate
;
struct
rtattr
*
vf
[
IFLA_VF_MAX
+
1
];
struct
rtattr
*
tmp
;
SPRINT_BUF
(
b1
);
...
...
@@ -255,6 +256,20 @@ static void print_vfinfo(FILE *fp, struct rtattr *vfinfo)
else
vf_spoofchk
=
RTA_DATA
(
vf
[
IFLA_VF_SPOOFCHK
]);
if
(
vf_spoofchk
)
{
/* Check if the link state vf info type is supported by
* this kernel.
*/
tmp
=
(
struct
rtattr
*
)((
char
*
)
vf
[
IFLA_VF_SPOOFCHK
]
+
vf
[
IFLA_VF_SPOOFCHK
]
->
rta_len
);
if
(
tmp
->
rta_type
!=
IFLA_VF_LINK_STATE
)
vf_linkstate
=
NULL
;
else
vf_linkstate
=
RTA_DATA
(
vf
[
IFLA_VF_LINK_STATE
]);
}
else
vf_linkstate
=
NULL
;
fprintf
(
fp
,
"
\n
vf %d MAC %s"
,
vf_mac
->
vf
,
ll_addr_n2a
((
unsigned
char
*
)
&
vf_mac
->
mac
,
ETH_ALEN
,
0
,
b1
,
sizeof
(
b1
)));
...
...
@@ -270,6 +285,14 @@ static void print_vfinfo(FILE *fp, struct rtattr *vfinfo)
else
fprintf
(
fp
,
", spoof checking off"
);
}
if
(
vf_linkstate
)
{
if
(
vf_linkstate
->
link_state
==
IFLA_VF_LINK_STATE_AUTO
)
fprintf
(
fp
,
", link-state auto"
);
else
if
(
vf_linkstate
->
link_state
==
IFLA_VF_LINK_STATE_ENABLE
)
fprintf
(
fp
,
", link-state enable"
);
else
fprintf
(
fp
,
", link-state disable"
);
}
}
static
void
print_link_stats64
(
FILE
*
fp
,
const
struct
rtnl_link_stats64
*
s
)
{
...
...
ip/iplink.c
View file @
cc71ad3d
...
...
@@ -77,6 +77,7 @@ void iplink_usage(void)
fprintf
(
stderr
,
" [ rate TXRATE ] ]
\n
"
);
fprintf
(
stderr
,
" [ spoofchk { on | off} ] ]
\n
"
);
fprintf
(
stderr
,
" [ state { auto | enable | disable} ] ]
\n
"
);
fprintf
(
stderr
,
" [ master DEVICE ]
\n
"
);
fprintf
(
stderr
,
" [ nomaster ]
\n
"
);
fprintf
(
stderr
,
" ip link show [ DEVICE | group GROUP ] [up]
\n
"
);
...
...
@@ -255,6 +256,19 @@ static int iplink_parse_vf(int vf, int *argcp, char ***argvp,
ivs
.
vf
=
vf
;
addattr_l
(
&
req
->
n
,
sizeof
(
*
req
),
IFLA_VF_SPOOFCHK
,
&
ivs
,
sizeof
(
ivs
));
}
else
if
(
matches
(
*
argv
,
"state"
)
==
0
)
{
struct
ifla_vf_link_state
ivl
;
NEXT_ARG
();
if
(
matches
(
*
argv
,
"auto"
)
==
0
)
ivl
.
link_state
=
IFLA_VF_LINK_STATE_AUTO
;
else
if
(
matches
(
*
argv
,
"enable"
)
==
0
)
ivl
.
link_state
=
IFLA_VF_LINK_STATE_ENABLE
;
else
if
(
matches
(
*
argv
,
"disable"
)
==
0
)
ivl
.
link_state
=
IFLA_VF_LINK_STATE_DISABLE
;
else
invarg
(
"Invalid
\"
state
\"
value
\n
"
,
*
argv
);
ivl
.
vf
=
vf
;
addattr_l
(
&
req
->
n
,
sizeof
(
*
req
),
IFLA_VF_LINK_STATE
,
&
ivl
,
sizeof
(
ivl
));
}
else
{
/* rewind arg */
PREV_ARG
();
...
...
ip/iproute.c
View file @
cc71ad3d
...
...
@@ -52,6 +52,7 @@ static const char *mx_names[RTAX_MAX+1] = {
[
RTAX_FEATURES
]
=
"features"
,
[
RTAX_RTO_MIN
]
=
"rto_min"
,
[
RTAX_INITRWND
]
=
"initrwnd"
,
[
RTAX_QUICKACK
]
=
"quickack"
,
};
static
void
usage
(
void
)
__attribute__
((
noreturn
));
...
...
@@ -79,6 +80,7 @@ static void usage(void)
fprintf
(
stderr
,
" [ window NUMBER] [ cwnd NUMBER ] [ initcwnd NUMBER ]
\n
"
);
fprintf
(
stderr
,
" [ ssthresh NUMBER ] [ realms REALM ] [ src ADDRESS ]
\n
"
);
fprintf
(
stderr
,
" [ rto_min TIME ] [ hoplimit NUMBER ] [ initrwnd NUMBER ]
\n
"
);
fprintf
(
stderr
,
" [ quickack BOOL ]
\n
"
);
fprintf
(
stderr
,
"TYPE := [ unicast | local | broadcast | multicast | throw |
\n
"
);
fprintf
(
stderr
,
" unreachable | prohibit | blackhole | nat ]
\n
"
);
fprintf
(
stderr
,
"TABLE_ID := [ local | main | default | all | NUMBER ]
\n
"
);
...
...
@@ -86,6 +88,7 @@ static void usage(void)
fprintf
(
stderr
,
"NHFLAGS := [ onlink | pervasive ]
\n
"
);
fprintf
(
stderr
,
"RTPROTO := [ kernel | boot | static | NUMBER ]
\n
"
);
fprintf
(
stderr
,
"TIME := NUMBER[s|ms]
\n
"
);
fprintf
(
stderr
,
"BOOL := [1|0]
\n
"
);
exit
(
-
1
);
}
...
...
@@ -885,6 +888,14 @@ static int iproute_modify(int cmd, unsigned flags, int argc, char **argv)
if
(
get_unsigned
(
&
win
,
*
argv
,
0
))
invarg
(
"
\"
initrwnd
\"
value is invalid
\n
"
,
*
argv
);
rta_addattr32
(
mxrta
,
sizeof
(
mxbuf
),
RTAX_INITRWND
,
win
);
}
else
if
(
matches
(
*
argv
,
"quickack"
)
==
0
)
{
unsigned
quickack
;
NEXT_ARG
();
if
(
get_unsigned
(
&
quickack
,
*
argv
,
0
))
invarg
(
"
\"
quickack
\"
value is invalid
\n
"
,
*
argv
);
if
(
quickack
!=
1
&&
quickack
!=
0
)
invarg
(
"
\"
quickack
\"
value should be 0 or 1
\n
"
,
*
argv
);
rta_addattr32
(
mxrta
,
sizeof
(
mxbuf
),
RTAX_QUICKACK
,
quickack
);
}
else
if
(
matches
(
*
argv
,
"rttvar"
)
==
0
)
{
unsigned
win
;
NEXT_ARG
();
...
...
man/man8/ip-route.8.in
View file @
cc71ad3d
...
...
@@ -111,6 +111,8 @@ replace " } "
.IR NUMBER " ] [ "
.B initrwnd
.IR NUMBER " ]"
.B quickack
.IR BOOL " ]"
.ti -8
.IR TYPE " := [ "
...
...
@@ -406,6 +408,10 @@ the initial receive window size for connections to this destination.
Actual window size is this value multiplied by the MSS of the connection.
The default value is zero, meaning to use Slow Start value.
.TP
.BI quickack " BOOL " "(3.11+ only)"
Enable or disable quick ack for connections to this destination.
.TP
.BI advmss " NUMBER " "(2.3.15+ only)"
the MSS ('Maximal Segment Size') to advertise to these
...
...
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