]> git.baikalelectronics.ru Git - kernel.git/commit
wireguard: device: use icmp_ndo_send helper
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 11 Feb 2020 19:47:08 +0000 (20:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Feb 2020 22:19:00 +0000 (14:19 -0800)
commitf1e0e72347e554f6fc531c8c5ee232f33b3a53c0
treef48df8094b2070df02c3c999916697e9226cfb07
parentfc597f372a44fbf9cf53d9c23337e0b37579960d
wireguard: device: use icmp_ndo_send helper

Because wireguard is calling icmp from network device context, it should
use the ndo helper so that the rate limiting applies correctly.  This
commit adds a small test to the wireguard test suite to ensure that the
new functions continue doing the right thing in the context of
wireguard. It does this by setting up a condition that will definately
evoke an icmp error message from the driver, but along a nat'd path.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wireguard/device.c
tools/testing/selftests/wireguard/netns.sh