mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-07 00:59:06 +00:00
ipv4: Don't use enums as bitmasks in ip_fragment.c
Noticed by Joe Perches. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
11e73de7cc
commit
1d1652cbdb
1 changed files with 4 additions and 6 deletions
|
@ -81,12 +81,10 @@ struct ipq {
|
||||||
* We want to check ECN values of all fragments, do detect invalid combinations.
|
* We want to check ECN values of all fragments, do detect invalid combinations.
|
||||||
* In ipq->ecn, we store the OR value of each ip4_frag_ecn() fragment value.
|
* In ipq->ecn, we store the OR value of each ip4_frag_ecn() fragment value.
|
||||||
*/
|
*/
|
||||||
enum {
|
#define IPFRAG_ECN_NOT_ECT 0x01 /* one frag had ECN_NOT_ECT */
|
||||||
IPFRAG_ECN_NOT_ECT = 0x01, /* one frag had ECN_NOT_ECT */
|
#define IPFRAG_ECN_ECT_1 0x02 /* one frag had ECN_ECT_1 */
|
||||||
IPFRAG_ECN_ECT_1 = 0x02, /* one frag had ECN_ECT_1 */
|
#define IPFRAG_ECN_ECT_0 0x04 /* one frag had ECN_ECT_0 */
|
||||||
IPFRAG_ECN_ECT_0 = 0x04, /* one frag had ECN_ECT_0 */
|
#define IPFRAG_ECN_CE 0x08 /* one frag had ECN_CE */
|
||||||
IPFRAG_ECN_CE = 0x08, /* one frag had ECN_CE */
|
|
||||||
};
|
|
||||||
|
|
||||||
static inline u8 ip4_frag_ecn(u8 tos)
|
static inline u8 ip4_frag_ecn(u8 tos)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue