tc: u32 filter coding style cleanup
Add missing spaces around operators to increase readability. Aside from that, make "preference" match a real synonym for "tos" and "dsfield" as it's effect was identical to them. Signed-off-by: Phil Sutter <phil@nwl.cc>
This commit is contained in:
parent
0a83e1eaf7
commit
40eb737ebb
|
|
@ -496,7 +496,8 @@ static int parse_ip(int *argc_p, char ***argv_p, struct tc_u32_sel *sel)
|
|||
NEXT_ARG();
|
||||
res = parse_ip_addr(&argc, &argv, sel, 16);
|
||||
} else if (strcmp(*argv, "tos") == 0 ||
|
||||
matches(*argv, "dsfield") == 0) {
|
||||
matches(*argv, "dsfield") == 0 ||
|
||||
matches(*argv, "precedence") == 0) {
|
||||
NEXT_ARG();
|
||||
res = parse_u8(&argc, &argv, sel, 1, 0);
|
||||
} else if (strcmp(*argv, "ihl") == 0) {
|
||||
|
|
@ -505,9 +506,6 @@ static int parse_ip(int *argc_p, char ***argv_p, struct tc_u32_sel *sel)
|
|||
} else if (strcmp(*argv, "protocol") == 0) {
|
||||
NEXT_ARG();
|
||||
res = parse_u8(&argc, &argv, sel, 9, 0);
|
||||
} else if (matches(*argv, "precedence") == 0) {
|
||||
NEXT_ARG();
|
||||
res = parse_u8(&argc, &argv, sel, 1, 0);
|
||||
} else if (strcmp(*argv, "nofrag") == 0) {
|
||||
argc--; argv++;
|
||||
res = pack_key16(sel, 0, 0x3FFF, 6, 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue