diff --git a/ip/iproute.c b/ip/iproute.c index c1957833..83037c8a 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -883,6 +883,10 @@ static int iproute_modify(int cmd, unsigned int flags, int argc, char **argv) inet_prefix addr; int family; + if (gw_ok) { + invarg("use nexthop syntax to specify multiple via\n", + *argv); + } gw_ok = 1; NEXT_ARG(); family = read_family(*argv); diff --git a/man/man8/tc-csum.8 b/man/man8/tc-csum.8 index f4392a4a..718301de 100644 --- a/man/man8/tc-csum.8 +++ b/man/man8/tc-csum.8 @@ -60,9 +60,9 @@ packets, both IP and UDP checksums have to be recalculated: .RS .EX # tc qdisc add dev eth0 ingress handle ffff: -# tc filter add eth0 prio 1 protocol ip parent ffff: \\ - u32 match ip src 192.168.1.100/32 flowid :1 \\ - action pedit munge ip dst set 0x12345678 pipe \\ +# tc filter add dev eth0 prio 1 protocol ip parent ffff: \\ + u32 match ip src 192.0.2.100/32 flowid :1 \\ + action pedit munge ip dst set 198.51.100.1 pipe \\ csum ip and udp .EE .RE diff --git a/tc/f_flower.c b/tc/f_flower.c index a6c0e1cd..403100c9 100644 --- a/tc/f_flower.c +++ b/tc/f_flower.c @@ -769,9 +769,11 @@ parse_done: return ret; } - ret = addattr16(n, MAX_MSG, TCA_FLOWER_KEY_ETH_TYPE, eth_type); - if (ret) - return ret; + if (eth_type != htons(ETH_P_ALL)) { + ret = addattr16(n, MAX_MSG, TCA_FLOWER_KEY_ETH_TYPE, eth_type); + if (ret) + return ret; + } tail->rta_len = (((void *)n)+n->nlmsg_len) - (void *)tail; diff --git a/tc/m_action.c b/tc/m_action.c index bb19df88..05ef07e0 100644 --- a/tc/m_action.c +++ b/tc/m_action.c @@ -365,12 +365,18 @@ int print_action(const struct sockaddr_nl *who, fprintf(fp, "Flushed table "); tab_flush = 1; } else { - fprintf(fp, "deleted action "); + fprintf(fp, "Deleted action "); } } - if (n->nlmsg_type == RTM_NEWACTION) - fprintf(fp, "Added action "); + if (n->nlmsg_type == RTM_NEWACTION) { + if ((n->nlmsg_flags & NLM_F_CREATE) && + !(n->nlmsg_flags & NLM_F_REPLACE)) { + fprintf(fp, "Added action "); + } else if (n->nlmsg_flags & NLM_F_REPLACE) { + fprintf(fp, "Replaced action "); + } + } tc_print_action(fp, tb[TCA_ACT_TAB]); return 0;