Merge branch 'master' into net-next

This commit is contained in:
Stephen Hemminger 2017-01-29 20:30:05 -08:00
commit fefc93bb28
4 changed files with 21 additions and 9 deletions

View File

@ -883,6 +883,10 @@ static int iproute_modify(int cmd, unsigned int flags, int argc, char **argv)
inet_prefix addr; inet_prefix addr;
int family; int family;
if (gw_ok) {
invarg("use nexthop syntax to specify multiple via\n",
*argv);
}
gw_ok = 1; gw_ok = 1;
NEXT_ARG(); NEXT_ARG();
family = read_family(*argv); family = read_family(*argv);

View File

@ -60,9 +60,9 @@ packets, both IP and UDP checksums have to be recalculated:
.RS .RS
.EX .EX
# tc qdisc add dev eth0 ingress handle ffff: # tc qdisc add dev eth0 ingress handle ffff:
# tc filter add eth0 prio 1 protocol ip parent ffff: \\ # tc filter add dev eth0 prio 1 protocol ip parent ffff: \\
u32 match ip src 192.168.1.100/32 flowid :1 \\ u32 match ip src 192.0.2.100/32 flowid :1 \\
action pedit munge ip dst set 0x12345678 pipe \\ action pedit munge ip dst set 198.51.100.1 pipe \\
csum ip and udp csum ip and udp
.EE .EE
.RE .RE

View File

@ -769,9 +769,11 @@ parse_done:
return ret; return ret;
} }
ret = addattr16(n, MAX_MSG, TCA_FLOWER_KEY_ETH_TYPE, eth_type); if (eth_type != htons(ETH_P_ALL)) {
if (ret) ret = addattr16(n, MAX_MSG, TCA_FLOWER_KEY_ETH_TYPE, eth_type);
return ret; if (ret)
return ret;
}
tail->rta_len = (((void *)n)+n->nlmsg_len) - (void *)tail; tail->rta_len = (((void *)n)+n->nlmsg_len) - (void *)tail;

View File

@ -365,12 +365,18 @@ int print_action(const struct sockaddr_nl *who,
fprintf(fp, "Flushed table "); fprintf(fp, "Flushed table ");
tab_flush = 1; tab_flush = 1;
} else { } else {
fprintf(fp, "deleted action "); fprintf(fp, "Deleted action ");
} }
} }
if (n->nlmsg_type == RTM_NEWACTION) if (n->nlmsg_type == RTM_NEWACTION) {
fprintf(fp, "Added action "); 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]); tc_print_action(fp, tb[TCA_ACT_TAB]);
return 0; return 0;