kernel_samsung_a53x/drivers/net/netdevsim
Hangbin Liu 9cd713378c netdevsim: copy addresses for both in and out paths
[ Upstream commit 2cf567f421dbfe7e53b7e5ddee9400da10efb75d ]

The current code only copies the address for the in path, leaving the out
path address set to 0. This patch corrects the issue by copying the addresses
for both the in and out paths. Before this patch:

  # cat /sys/kernel/debug/netdevsim/netdevsim0/ports/0/ipsec
  SA count=2 tx=20
  sa[0] tx ipaddr=0.0.0.0
  sa[0]    spi=0x00000100 proto=0x32 salt=0x0adecc3a crypt=1
  sa[0]    key=0x3167608a ca4f1397 43565909 941fa627
  sa[1] rx ipaddr=192.168.0.1
  sa[1]    spi=0x00000101 proto=0x32 salt=0x0adecc3a crypt=1
  sa[1]    key=0x3167608a ca4f1397 43565909 941fa627

After this patch:

  = cat /sys/kernel/debug/netdevsim/netdevsim0/ports/0/ipsec
  SA count=2 tx=20
  sa[0] tx ipaddr=192.168.0.2
  sa[0]    spi=0x00000100 proto=0x32 salt=0x0adecc3a crypt=1
  sa[0]    key=0x3167608a ca4f1397 43565909 941fa627
  sa[1] rx ipaddr=192.168.0.1
  sa[1]    spi=0x00000101 proto=0x32 salt=0x0adecc3a crypt=1
  sa[1]    key=0x3167608a ca4f1397 43565909 941fa627

Fixes: 7699353da875 ("netdevsim: add ipsec offload testing")
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://patch.msgid.link/20241010040027.21440-3-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-17 13:24:04 +01:00
..
bpf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ethtool.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fib.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
health.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipsec.c netdevsim: copy addresses for both in and out paths 2024-12-17 13:24:04 +01:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netdev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netdevsim.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
udp_tunnels.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00