Message ID | 20201012154129.1824527-1-matthieu.baerts@tessares.net |
---|---|
State | Superseded, archived |
Delegated to: | Matthieu Baerts |
Headers | show |
Series | [mptcp-next] Squash to "selftests: mptcp: add ADD_ADDR timeout test case" | expand |
Matthieu Baerts <matthieu.baerts@tessares.net> 于2020年10月12日周一 下午11:41写道: > > Skip mptcp_join selftest if IPTables is not available. > > Ideally, I agree that we should switch to ntf but I don't know the > advanced features of it to block ADD_ADDR packets by matching TCP option > 30 and MPTCP subtype 3. If it is possible to do that, please guide me to > match MPTCP option (it looks like we are limited to a fixed list and > MPTCP is not there) and match some data after and offset (tcp doff?). > > Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Acked-by: Geliang Tang <geliangtang@gmail.com> > --- > > Notes: > to be squashed in "selftests: mptcp: add ADD_ADDR timeout test case" > > tools/testing/selftests/net/mptcp/mptcp_join.sh | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh > index 3767acb9bb12..0b060d9a79ae 100755 > --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh > +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh > @@ -122,6 +122,12 @@ if [ $? -ne 0 ];then > exit $ksft_skip > fi > > +iptables -V > /dev/null 2>&1 > +if [ $? -ne 0 ];then > + echo "SKIP: Could not run all tests without iptables tool" > + exit $ksft_skip > +fi > + > > check_transfer() > { > -- > 2.27.0 > _______________________________________________ > mptcp mailing list -- mptcp@lists.01.org > To unsubscribe send an email to mptcp-leave@lists.01.org
On Mon, 12 Oct 2020, Matthieu Baerts wrote: > Skip mptcp_join selftest if IPTables is not available. > > Ideally, I agree that we should switch to ntf but I don't know the > advanced features of it to block ADD_ADDR packets by matching TCP option > 30 and MPTCP subtype 3. If it is possible to do that, please guide me to > match MPTCP option (it looks like we are limited to a fixed list and > MPTCP is not there) and match some data after and offset (tcp doff?). > > Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> > --- > > Notes: > to be squashed in "selftests: mptcp: add ADD_ADDR timeout test case" > > tools/testing/selftests/net/mptcp/mptcp_join.sh | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh > index 3767acb9bb12..0b060d9a79ae 100755 > --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh > +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh > @@ -122,6 +122,12 @@ if [ $? -ne 0 ];then > exit $ksft_skip > fi > > +iptables -V > /dev/null 2>&1 > +if [ $? -ne 0 ];then > + echo "SKIP: Could not run all tests without iptables tool" > + exit $ksft_skip > +fi > + > > check_transfer() > { > -- > 2.27.0 For now, I'd rather have it skip than fail in this situation. I don't know how complex the nftables netlink API is, I wonder if a small special-purpose tool (borrow some genl bits from pm_nl_ctl.c) to set up one rule for dropping ADD_ADDR would work? -- Mat Martineau Intel
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 3767acb9bb12..0b060d9a79ae 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -122,6 +122,12 @@ if [ $? -ne 0 ];then exit $ksft_skip fi +iptables -V > /dev/null 2>&1 +if [ $? -ne 0 ];then + echo "SKIP: Could not run all tests without iptables tool" + exit $ksft_skip +fi + check_transfer() {
Skip mptcp_join selftest if IPTables is not available. Ideally, I agree that we should switch to ntf but I don't know the advanced features of it to block ADD_ADDR packets by matching TCP option 30 and MPTCP subtype 3. If it is possible to do that, please guide me to match MPTCP option (it looks like we are limited to a fixed list and MPTCP is not there) and match some data after and offset (tcp doff?). Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> --- Notes: to be squashed in "selftests: mptcp: add ADD_ADDR timeout test case" tools/testing/selftests/net/mptcp/mptcp_join.sh | 6 ++++++ 1 file changed, 6 insertions(+)