@@ -25,7 +25,7 @@ static void usage(void)
"Usage: ip mptcp endpoint add ADDRESS [ dev NAME ] [ id ID ]\n"
" [ port NR ] [ FLAG-LIST ]\n"
" ip mptcp endpoint delete id ID [ ADDRESS ]\n"
- " ip mptcp endpoint change id ID CHANGE-OPT\n"
+ " ip mptcp endpoint change [ id ID ] [ ADDRESS ] [ port NR ] CHANGE-OPT\n"
" ip mptcp endpoint show [ id ID ]\n"
" ip mptcp endpoint flush\n"
" ip mptcp limits set [ subflows NR ] [ add_addr_accepted NR ]\n"
@@ -175,9 +175,12 @@ static int mptcp_parse_opt(int argc, char **argv, struct nlmsghdr *n, int cmd)
invarg("address is needed for deleting id 0 address\n", "ID");
}
- if (port && !(flags & MPTCP_PM_ADDR_FLAG_SIGNAL))
+ if (adding && port && !(flags & MPTCP_PM_ADDR_FLAG_SIGNAL))
invarg("flags must have signal when using port", "port");
+ if (setting && id_set && port)
+ invarg("port can't be used with id", "port");
+
attr_addr = addattr_nest(n, MPTCP_BUFLEN,
MPTCP_PM_ATTR_ADDR | NLA_F_NESTED);
if (id_set)
@@ -38,11 +38,14 @@ ip-mptcp \- MPTCP path manager configuration
.RB "] "
.ti -8
-.BR "ip mptcp endpoint change id "
+.BR "ip mptcp endpoint change "
+.RB "[ " id
.I ID
-.RB "[ "
-.I CHANGE-OPT
-.RB "] "
+.RB "] [ "
+.IR IFADDR
+.RB "] [ " port
+.IR PORT " ]"
+.RB "CHANGE-OPT"
.ti -8
.BR "ip mptcp endpoint show "