- /*
- * We get here for 2 cases:
- *
- * a. From MPTCP, to connect a subflow. There is no need to
- * bind the socket to the source address and/or interface,
- * since everything has been taken care of by MPTCP. We
- * simply check whether or not this is for the initial
- * MPTCP connection attempt, or to join an existing one.
- *
- * b. From the socket layer, to connect a TCP. Perform the
- * bind to source address and/or interface as necessary.
- */
-#if MPTCP
- if (flags & CONNREQF_MPTCP) {
- struct mptsub_connreq *mpcr = arg;
-
- /* Check to make sure this came down from MPTCP */
- if (arg == NULL || arglen != sizeof (*mpcr))
- return (EOPNOTSUPP);
-
- switch (mpcr->mpcr_type) {
- case MPTSUB_CONNREQ_MP_ENABLE:
- break;
- case MPTSUB_CONNREQ_MP_ADD:
- break;
- default:
- return (EOPNOTSUPP);
- }
- } else
-#endif /* MPTCP */
- {
- /* bind socket to the specified interface, if requested */
- if (ifscope != IFSCOPE_NONE &&
- (error = inp_bindif(inp, ifscope, NULL)) != 0)
- return (error);
+ /* bind socket to the specified interface, if requested */
+ if (ifscope != IFSCOPE_NONE &&
+ (error = inp_bindif(inp, ifscope, NULL)) != 0) {
+ goto done;
+ }