diff mbox series

[net-next] rxrpc: Fix dependency on IPv6 in udp tunnel config

Message ID 20210209135429.2016-1-vfedorenko@novek.ru (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net-next] rxrpc: Fix dependency on IPv6 in udp tunnel config | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers warning 3 maintainers not CCed: linux-afs@lists.infradead.org davem@davemloft.net lucien.xin@gmail.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Vadim Fedorenko Feb. 9, 2021, 1:54 p.m. UTC
As udp_port_cfg struct changes its members with dependency on IPv6
configuration, the code in rxrpc should also check for IPv6.

Fixes: 1a9b86c9fd95 ("rxrpc: use udp tunnel APIs instead of open code in rxrpc_open_socket")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
---
 net/rxrpc/local_object.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Vadim Fedorenko Feb. 11, 2021, 7:12 p.m. UTC | #1
On 09.02.2021 13:54, Vadim Fedorenko wrote:
> As udp_port_cfg struct changes its members with dependency on IPv6
> configuration, the code in rxrpc should also check for IPv6.

Looks like this patch was mistakely tagged as superseded by
dc0e6056decc rxrpc: Fix missing dependency on NET_UDP_TUNNEL
Although both patches have the same Fixes tag, this one fixes
different problem - rxrpc subsystem could not be compiled without
support for IPv6 because the code tries to access ipv6-specific
members of struct udp_port_cfg.

Should I resend it?
Jakub Kicinski Feb. 12, 2021, 1:38 a.m. UTC | #2
On Thu, 11 Feb 2021 19:12:57 +0000 Vadim Fedorenko wrote:
> On 09.02.2021 13:54, Vadim Fedorenko wrote:
> > As udp_port_cfg struct changes its members with dependency on IPv6
> > configuration, the code in rxrpc should also check for IPv6.  
> 
> Looks like this patch was mistakely tagged as superseded by
> dc0e6056decc rxrpc: Fix missing dependency on NET_UDP_TUNNEL
> Although both patches have the same Fixes tag, this one fixes
> different problem - rxrpc subsystem could not be compiled without
> support for IPv6 because the code tries to access ipv6-specific
> members of struct udp_port_cfg.

It does happen sometimes, it's the patchwork bot marking things as
superseded :(
 
> Should I resend it?

Yes, that'd probably be easiest for Dave to handle.
diff mbox series

Patch

diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c
index 546fd237a649..a4111408ffd0 100644
--- a/net/rxrpc/local_object.c
+++ b/net/rxrpc/local_object.c
@@ -120,9 +120,11 @@  static int rxrpc_open_socket(struct rxrpc_local *local, struct net *net)
 	if (udp_conf.family == AF_INET) {
 		udp_conf.local_ip = srx->transport.sin.sin_addr;
 		udp_conf.local_udp_port = srx->transport.sin.sin_port;
+#if IS_ENABLED(CONFIG_AF_RXRPC_IPV6)
 	} else {
 		udp_conf.local_ip6 = srx->transport.sin6.sin6_addr;
 		udp_conf.local_udp_port = srx->transport.sin6.sin6_port;
+#endif
 	}
 	ret = udp_sock_create(net, &udp_conf, &local->socket);
 	if (ret < 0) {