From: Maciej Żenczykowski Date: Sat, 22 Oct 2011 04:07:47 +0000 (-0400) Subject: net: use INET_ECN_MASK instead of hardcoded 3 X-Git-Tag: firefly_0821_release~3680^2~4326^2~19 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2c67e9acb65da96ae1b0ba93ec04af7142533bef;p=firefly-linux-kernel-4.4.55.git net: use INET_ECN_MASK instead of hardcoded 3 Signed-off-by: Maciej Żenczykowski Signed-off-by: David S. Miller --- 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 @@ #include #include #include +#include #include #include #include @@ -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;