diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ip_sockglue.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index f0dc3ad662ae..09ff51bf16a4 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/netfilter.h> | 33 | #include <linux/netfilter.h> |
34 | #include <linux/route.h> | 34 | #include <linux/route.h> |
35 | #include <linux/mroute.h> | 35 | #include <linux/mroute.h> |
36 | #include <net/inet_ecn.h> | ||
36 | #include <net/route.h> | 37 | #include <net/route.h> |
37 | #include <net/xfrm.h> | 38 | #include <net/xfrm.h> |
38 | #include <net/compat.h> | 39 | #include <net/compat.h> |
@@ -578,8 +579,8 @@ static int do_ip_setsockopt(struct sock *sk, int level, | |||
578 | break; | 579 | break; |
579 | case IP_TOS: /* This sets both TOS and Precedence */ | 580 | case IP_TOS: /* This sets both TOS and Precedence */ |
580 | if (sk->sk_type == SOCK_STREAM) { | 581 | if (sk->sk_type == SOCK_STREAM) { |
581 | val &= ~3; | 582 | val &= ~INET_ECN_MASK; |
582 | val |= inet->tos & 3; | 583 | val |= inet->tos & INET_ECN_MASK; |
583 | } | 584 | } |
584 | if (inet->tos != val) { | 585 | if (inet->tos != val) { |
585 | inet->tos = val; | 586 | inet->tos = val; |