Skip to content

Commit 1d1652c

Browse files
committed
ipv4: Don't use enums as bitmasks in ip_fragment.c
Noticed by Joe Perches. Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 11e73de commit 1d1652c

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎net/ipv4/ip_fragment.c‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,10 @@ struct ipq {
8181
* We want to check ECN values of all fragments, do detect invalid combinations.
8282
* In ipq->ecn, we store the OR value of each ip4_frag_ecn() fragment value.
8383
*/
84-
enum {
85-
IPFRAG_ECN_NOT_ECT = 0x01, /* one frag had ECN_NOT_ECT */
86-
IPFRAG_ECN_ECT_1 = 0x02, /* one frag had ECN_ECT_1 */
87-
IPFRAG_ECN_ECT_0 = 0x04, /* one frag had ECN_ECT_0 */
88-
IPFRAG_ECN_CE = 0x08, /* one frag had ECN_CE */
89-
};
84+
#define IPFRAG_ECN_NOT_ECT 0x01 /* one frag had ECN_NOT_ECT */
85+
#define IPFRAG_ECN_ECT_1 0x02 /* one frag had ECN_ECT_1 */
86+
#define IPFRAG_ECN_ECT_0 0x04 /* one frag had ECN_ECT_0 */
87+
#define IPFRAG_ECN_CE 0x08 /* one frag had ECN_CE */
9088

9189
static inline u8 ip4_frag_ecn(u8 tos)
9290
{

0 commit comments

Comments
 (0)