From c246d942eabc3288f5d93930663411070093ac52 Mon Sep 17 00:00:00 2001 From: Karsten Graul Date: Fri, 16 Mar 2018 15:06:39 +0100 Subject: net/smc: restructure netinfo for CLC proposal msgs Introduce functions smc_clc_prfx_set to retrieve IP information for the CLC proposal msg and smc_clc_prfx_match to match the contents of a proposal message against the IP addresses of the net device. The new functions replace the functionality provided by smc_clc_netinfo_by_tcpsk, which is removed by this patch. The match functionality is extended to scan all ipv4 addresses of the net device for a match against the ipv4 subnet from the proposal msg. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller --- net/smc/smc_clc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/smc/smc_clc.h') diff --git a/net/smc/smc_clc.h b/net/smc/smc_clc.h index 20e048beac30..5ddb0d22eb8a 100644 --- a/net/smc/smc_clc.h +++ b/net/smc/smc_clc.h @@ -122,8 +122,8 @@ smc_clc_proposal_get_prefix(struct smc_clc_msg_proposal *pclc) ((u8 *)pclc + sizeof(*pclc) + ntohs(pclc->iparea_offset)); } -int smc_clc_netinfo_by_tcpsk(struct socket *clcsock, __be32 *subnet, - u8 *prefix_len); +int smc_clc_prfx_match(struct socket *clcsock, + struct smc_clc_msg_proposal_prefix *prop); int smc_clc_wait_msg(struct smc_sock *smc, void *buf, int buflen, u8 expected_type); int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info); -- cgit v1.2.3