Commit dec01609 authored by Arnd Hannemann's avatar Arnd Hannemann Committed by Stephen Hemminger

iproute2: Add dsfield as alias for tos for ip rules

Get ip rule parsing of "dsfield" in sync with ip route parsing and manual page.
Signed-off-by: default avatarArnd Hannemann <hannemann@nets.rwth-aachen.de>
parent 0d1c9b57
......@@ -270,7 +270,8 @@ static int iprule_modify(int cmd, int argc, char **argv)
if (get_u32(&pref, *argv, 0))
invarg("preference value is invalid\n", *argv);
addattr32(&req.n, sizeof(req), FRA_PRIORITY, pref);
} else if (strcmp(*argv, "tos") == 0) {
} else if (strcmp(*argv, "tos") == 0 ||
matches(*argv, "dsfield") == 0) {
__u32 tos;
NEXT_ARG();
if (rtnl_dsfield_a2n(&tos, *argv))
......
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