projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf533ea
)
net: use INET_ECN_MASK instead of hardcoded 3
author
Maciej Żenczykowski
<
[email protected]
>
Sat, 22 Oct 2011 04:07:47 +0000
(
00:07
-0400)
committer
David S. Miller
<
[email protected]
>
Sat, 22 Oct 2011 04:07:47 +0000
(
00:07
-0400)
Signed-off-by: Maciej Żenczykowski <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv4/ip_sockglue.c
patch
|
blob
|
history
diff --git
a/net/ipv4/ip_sockglue.c
b/net/ipv4/ip_sockglue.c
index f0dc3ad662ae3e3ff76a0ea2ec159896b058832b..09ff51bf16a4c400d84f67caa7137de3678649d3 100644
(file)
--- a/
net/ipv4/ip_sockglue.c
+++ b/
net/ipv4/ip_sockglue.c
@@
-33,6
+33,7
@@
#include <linux/netfilter.h>
#include <linux/route.h>
#include <linux/mroute.h>
+#include <net/inet_ecn.h>
#include <net/route.h>
#include <net/xfrm.h>
#include <net/compat.h>
@@
-578,8
+579,8
@@
static int do_ip_setsockopt(struct sock *sk, int level,
break;
case IP_TOS: /* This sets both TOS and Precedence */
if (sk->sk_type == SOCK_STREAM) {
- val &= ~
3
;
- val |= inet->tos &
3
;
+ val &= ~
INET_ECN_MASK
;
+ val |= inet->tos &
INET_ECN_MASK
;
}
if (inet->tos != val) {
inet->tos = val;