Skip to content

Commit

Permalink
configure: Automatically choose default plugin. (multipath-tcp#205)
Browse files Browse the repository at this point in the history
Choose the default mptcpd plugin based on the kernel mptcpd is
configured to support.  Specifically, the addr_adv plugin will
continue to be the default for the upstream kernel, and the sspi
plugin will be the default for the multipath-tcp.org kernel.  The
MPTCP path management generic netlink API used by addr_adv is not
supported by the multipath-tcp.org kernel, meaning the addr_adv plugin
is not a suitable default for it.
  • Loading branch information
Ossama Othman authored Jan 26, 2022
1 parent e2204ec commit 4927ef7
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,12 @@ AC_ARG_WITH([kernel],
# Allow the user to set the default path manager plugin at 'configure-time'.
AC_ARG_WITH([path-manager],
[AS_HELP_STRING([--with-path-manager[=PLUGIN]],
[Set default path manager plugin to PLUGIN (addr_adv, sspi) @<:@default=addr_adv@:>@])],
[Set default path manager plugin to PLUGIN (addr_adv, sspi) @<:@default=auto@:>@])],
[AS_CASE([$withval],
[addr_adv | sspi],
[with_path_manager=$withval],
[AC_MSG_ERROR([invalid path manager plugin: $withval])])],
[with_path_manager=addr_adv])

AC_SUBST([mptcpd_default_pm],[$with_path_manager])
[with_path_manager=auto])

# Systemd unit directory detection and handling.
AC_ARG_WITH([systemdsystemunitdir],
Expand Down Expand Up @@ -249,6 +247,19 @@ AS_IF([test "x$with_kernel" = "xupstream"],
AC_MSG_NOTICE([Building support for upstream kernel.])],
[AC_MSG_NOTICE([Building support for multipath-tcp.org kernel.])])

dnl Set default path manager based on selected kernel as needed.
dnl
dnl The multipath-tcp.org kernel doesn't support the in-kernel path
dnl manager netlink API used by the addr_adv mptcpd plugin. Use the
dnl sspi plugin in that case.
AS_IF([test "x$with_path_manager" = "xauto"],
[AS_IF([test "x$with_kernel" = "xupstream"],
[with_path_manager=addr_adv],
[with_path_manager=sspi])
AC_MSG_NOTICE([Default mptcpd path manager plugin: $with_path_manager.])])

AC_SUBST([mptcpd_default_pm],[$with_path_manager])

# ---------------------------------------------------------------
# Checks for typedefs, structures, and compiler characteristics.
# ---------------------------------------------------------------
Expand Down

0 comments on commit 4927ef7

Please sign in to comment.