Commit 338b003b authored by Phil Sutter's avatar Phil Sutter Committed by Stephen Hemminger

tc: pedit: Fix retain value for ihl adjustments

Since the IP Header Length field is just half a byte, adjust retain to
only match these bits so the Version field is not overwritten by
accident.

The whole concept is actually broken due to dependency on endianness
which pedit ignores.
Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
parent f440e9d8
......@@ -58,7 +58,7 @@ parse_ip(int *argc_p, char ***argv_p,struct tc_pedit_sel *sel,struct tc_pedit_ke
if (strcmp(*argv, "ihl") == 0) {
NEXT_ARG();
tkey->off = 0;
res = parse_cmd(&argc, &argv, 1, TU32,RU8,sel,tkey);
res = parse_cmd(&argc, &argv, 1, TU32,0x0f,sel,tkey);
goto done;
}
if (strcmp(*argv, "protocol") == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment