Re: [PATCH net-next v10] selftests/net/openvswitch: add SCTP flow key support and test

Aaron Conole <[email protected]>
Newsgroups org.kernel.vger.linux-kselftest,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>
Minxi Hou <[email protected]> writes:

> The ovskey flow-string parser has no OVS_KEY_ATTR_SCTP entry, so a
> flow string containing sctp(src=.../dst=...) parses without error but
> silently drops the L4 key. The resulting flow carries only
> ipv4(proto=132), and the kernel rejects it: match_validate() in
> flow_netlink.c requires OVS_KEY_ATTR_SCTP when the IP protocol is
> IPPROTO_SCTP and returns -EINVAL for the missing key.
>
> Register OVS_KEY_ATTR_SCTP in the parse table and add a matching
> selftest that verifies SCTP flow key matching (sctp src/dst port).
>
> One listener serves the whole test. socat's fork option handles each
> association in a child, so the flow rules are the only thing that
> changes between the three phases and the listener is never restarted
> underneath them. -t 1 bounds how long a forked child lingers after
> its association closes, and the existing kill -TERM of the captured
> pid on teardown removes the listener itself.
>
> Also enable CONFIG_IP_SCTP in the selftest kernel config. The config
> checker strips underscores before comparing keys, so the entry sorts
> before CONFIG_IPV6 rather than after it.
>
> Signed-off-by: Minxi Hou <[email protected]>
> ---

Reviewed-by: Aaron Conole <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.