ipv6: move IPV6_TCLASS_SHIFT into ipv6.h and define a helper
Two places defined IPV6_TCLASS_SHIFT, so we should move it into ipv6.h, and use this macro as possible. And define ip6_tclass helper to return tclass Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
e96a41ebde
commit
d76ed22b22
@@ -169,7 +169,7 @@ static int fib6_rule_match(struct fib_rule *rule, struct flowi *fl, int flags)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (r->tclass && r->tclass != ((ntohl(fl6->flowlabel) >> 20) & 0xff))
|
||||
if (r->tclass && r->tclass != ip6_tclass(fl6->flowlabel))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user