Skip to content

Commit

Permalink
Squash to "mptcp: add a new sysctl checksum_enabled"
Browse files Browse the repository at this point in the history
Fix a compilation error without CONFIG_SYSCTL:

  ld: net/mptcp/protocol.o: in function `__mptcp_init_sock':
  protocol.c:(.text+0x43e): undefined reference to `mptcp_is_checksum_enabled'
  ld: net/mptcp/subflow.o: in function `subflow_v6_route_req':
  subflow.c:(.text+0xa0a): undefined reference to `mptcp_is_checksum_enabled'
  ld: net/mptcp/subflow.o: in function `subflow_v4_route_req':
  subflow.c:(.text+0xabd): undefined reference to `mptcp_is_checksum_enabled'
  ld: net/mptcp/subflow.o: in function `mptcp_subflow_init_cookie_req':
  subflow.c:(.text+0xb74): undefined reference to `mptcp_is_checksum_enabled'
  ld: net/mptcp/options.o: in function `mptcp_syn_options':
  options.c:(.text+0x68a): undefined reference to `mptcp_is_checksum_enabled'

Simply moved this function outside CONFIG_SYSCTL with the other ones.

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Acked-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
  • Loading branch information
matttbe committed May 6, 2021
1 parent caf02cd commit d1af2c9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions net/mptcp/ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ unsigned int mptcp_get_add_addr_timeout(struct net *net)
return mptcp_get_pernet(net)->add_addr_timeout;
}

int mptcp_is_checksum_enabled(struct net *net)
{
return mptcp_get_pernet(net)->checksum_enabled;
}

static void mptcp_pernet_set_defaults(struct mptcp_pernet *pernet)
{
pernet->mptcp_enabled = 1;
Expand All @@ -49,11 +54,6 @@ static void mptcp_pernet_set_defaults(struct mptcp_pernet *pernet)
}

#ifdef CONFIG_SYSCTL
int mptcp_is_checksum_enabled(struct net *net)
{
return mptcp_get_pernet(net)->checksum_enabled;
}

static struct ctl_table mptcp_sysctl_table[] = {
{
.procname = "enabled",
Expand Down

0 comments on commit d1af2c9

Please sign in to comment.