ipv6_flowlabel.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/sh
  2. # SPDX-License-Identifier: GPL-2.0
  3. #
  4. # Regression tests for IPv6 flowlabels
  5. #
  6. # run in separate namespaces to avoid mgmt db conflicts betweent tests
  7. set -e
  8. echo "TEST management"
  9. ./in_netns.sh ./ipv6_flowlabel_mgr
  10. echo "TEST datapath"
  11. ./in_netns.sh \
  12. sh -c 'sysctl -q -w net.ipv6.auto_flowlabels=0 && ./ipv6_flowlabel -l 1'
  13. echo "TEST datapath (with auto-flowlabels)"
  14. ./in_netns.sh \
  15. sh -c 'sysctl -q -w net.ipv6.auto_flowlabels=1 && ./ipv6_flowlabel -l 1'
  16. echo "TEST datapath (with ping-sockets)"
  17. ./in_netns.sh \
  18. sh -c 'sysctl -q -w net.ipv6.flowlabel_reflect=4 && \
  19. sysctl -q -w net.ipv4.ping_group_range="0 2147483647" && \
  20. ./ipv6_flowlabel -l 1 -p'
  21. echo "TEST datapath (with flowinfo-send)"
  22. ./in_netns.sh \
  23. sh -c './ipv6_flowlabel -l 1 -s'
  24. echo "TEST datapath (with ping-sockets flowinfo-send)"
  25. ./in_netns.sh \
  26. sh -c 'sysctl -q -w net.ipv6.flowlabel_reflect=4 && \
  27. sysctl -q -w net.ipv4.ping_group_range="0 2147483647" && \
  28. ./ipv6_flowlabel -l 1 -p -s'
  29. echo OK. All tests passed