seg6_build_state() rejects invalid lwtunnel configurations with a bare -EINVAL,
so "ip route add ... encap seg6 ..." always reports "Invalid argument".

Patch 1 attaches an extack message to each of them.

Patch 2 adds a ksft/ynl selftest that hits some rejection paths and checks the
error messages.

Gabriel Goller (2):
  net: ipv6: seg6: report lwtunnel setup errors via extack
  selftests: seg6: check extack messages on SRv6 lwtunnel setup

 net/ipv6/seg6_iptunnel.c                      |  25 ++-
 tools/testing/selftests/net/Makefile          |   1 +
 .../selftests/net/srv6_iptunnel_extack.py     | 168 ++++++++++++++++++
 3 files changed, 189 insertions(+), 5 deletions(-)
 create mode 100755 tools/testing/selftests/net/srv6_iptunnel_extack.py


base-commit: 4bb9710c6a68d35207f123aef55dcd50e7195ec5
-- 
2.47.3



Reply via email to