On 4/10/17 8:36 AM, Robert Shearman wrote: > @@ -1184,6 +1192,20 @@ static int iproute_modify(int cmd, unsigned int flags, > int argc, char **argv) > > if (rta->rta_len > RTA_LENGTH(0)) > addraw_l(&req.n, 1024, RTA_DATA(rta), > RTA_PAYLOAD(rta)); > + } else if (strcmp(*argv, "ttl-propagate") == 0) { > + __u8 ttl_prop; > + > + NEXT_ARG(); > + if (strcmp(*argv, "enabled") == 0) > + ttl_prop = 1; > + else if (strcmp(*argv, "disabled") == 0) > + ttl_prop = 0; > + else > + invarg("\"ttl-propagate\" value is invalid\n", > + *argv); > +
matches() instead of strcmp() is more user friendly. 'enabled' is a lot to type. ;-)