Skip to content

Commit f193e48

Browse files
bgp: Disable MPTCP in the MD5 probing in the test
In the osrg/gobgp#3021, we fixed the GoBGP side to disable MPTCP, but didn't fix our MD5 support probing code in the script test. As a result, the peering-auth.txtar has been skipped for a while. Fix it by disabling MPTCP in the probing code as well. Fortunately, disabling and executing the test didn't produce any error. Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
1 parent ef58353 commit f193e48

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

pkg/bgp/test/probe.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package test
55

66
import (
7+
"context"
78
"errors"
89
"fmt"
910
"net"
@@ -15,7 +16,13 @@ import (
1516
// TCPMD5SigAvailable probes whether TCP_MD5SIG option can be set on a server socket.
1617
// Requires CONFIG_TCP_MD5SIG enabled in the kernel.
1718
func TCPMD5SigAvailable() (bool, error) {
18-
listener, err := net.Listen("tcp", "localhost:0")
19+
var lc net.ListenConfig
20+
21+
// Disable Multipath TCP to avoid "protocol not available" error on
22+
// kernels without MPTCP support.
23+
lc.SetMultipathTCP(false)
24+
25+
listener, err := lc.Listen(context.Background(), "tcp", "localhost:0")
1926
if err != nil {
2027
return false, fmt.Errorf("listen failed: %w", err)
2128
}

0 commit comments

Comments
 (0)