diff options
| author | Miguel García <miguelgarciaroman8@gmail.com> | 2025-08-19 00:02:03 +0200 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-08-19 18:06:24 -0700 |
| commit | 09bde6fdcd752b4512e7b554a3259e4f6b77c6d1 (patch) | |
| tree | dee8c3bad74af1f48d1de02d7732342298a111c8 /rust/helpers/build_bug.c | |
| parent | 9efd5152e32bb446752ead726a4621a50a95c11f (diff) | |
ipv6: ip6_gre: replace strcpy with strscpy for tunnel name
Replace the strcpy() call that copies the device name into
tunnel->parms.name with strscpy(), to avoid potential overflow
and guarantee NULL termination. This uses the two-argument
form of strscpy(), where the destination size is inferred
from the array type.
Destination is tunnel->parms.name (size IFNAMSIZ).
Tested in QEMU (Alpine rootfs):
- Created IPv6 GRE tunnels over loopback
- Assigned overlay IPv6 addresses
- Verified bidirectional ping through the tunnel
- Changed tunnel parameters at runtime (`ip -6 tunnel change`)
Signed-off-by: Miguel García <miguelgarciaroman8@gmail.com>
Link: https://patch.msgid.link/20250818220203.899338-1-miguelgarciaroman8@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/build_bug.c')
0 files changed, 0 insertions, 0 deletions
