Skip to content

Commit 33b9eab

Browse files
matttbeintel-lab-lkp
authored andcommitted
mptcp: pm: userspace: flags: clearer msg if no remote addr
Since its introduction in commit 892f396 ("mptcp: netlink: issue MP_PRIO signals from userspace PMs"), it was mandatory to specify the remote address, because of the 'if (rem->addr.family == AF_UNSPEC)' check done later one. In theory, this attribute can be optional, but it sounds better to be precise to avoid sending the MP_PRIO on the wrong subflow, e.g. if there are multiple subflows attached to the same local ID. This can be relaxed later on if there is a need to act on multiple subflows with one command. For the moment, the check to see if attr_rem is NULL can be removed, because mptcp_pm_parse_entry() will do this check as well, no need to do that differently here. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
1 parent d07f865 commit 33b9eab

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

net/mptcp/pm_userspace.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -580,11 +580,9 @@ int mptcp_userspace_pm_set_flags(struct sk_buff *skb, struct genl_info *info)
580580
if (ret < 0)
581581
goto set_flags_err;
582582

583-
if (attr_rem) {
584-
ret = mptcp_pm_parse_entry(attr_rem, info, false, &rem);
585-
if (ret < 0)
586-
goto set_flags_err;
587-
}
583+
ret = mptcp_pm_parse_entry(attr_rem, info, false, &rem);
584+
if (ret < 0)
585+
goto set_flags_err;
588586

589587
if (loc.addr.family == AF_UNSPEC ||
590588
rem.addr.family == AF_UNSPEC) {

0 commit comments

Comments
 (0)