Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Nov 27, 2023
1 parent 329b2c8 commit 72b2be9
Show file tree
Hide file tree
Showing 4 changed files with 6,920 additions and 0 deletions.
18 changes: 18 additions & 0 deletions internal/minipipeline/analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,16 @@ func (wa *WebAnalysis) ComputeDNSPossiblyInvalidAddrs(c *WebObservationsContaine
wa.DNSPossiblyInvalidAddrs = optional.Some(state)
}

func analysisTCPConnectFailureSeemsMisconfiguredIPv6(obs *WebObservation) bool {
switch obs.TCPConnectFailure.UnwrapOr("") {
case netxlite.FailureNetworkUnreachable, netxlite.FailureHostUnreachable:
isv6, err := netxlite.IsIPv6(obs.IPAddress.UnwrapOr(""))
return err == nil && isv6
default:
return false
}
}

// ComputeTCPTransactionsWithUnexpectedTCPConnectFailures computes the TCPTransactionsWithUnexpectedTCPConnectFailures field.
func (wa *WebAnalysis) ComputeTCPTransactionsWithUnexpectedTCPConnectFailures(c *WebObservationsContainer) {
state := make(map[int64]bool)
Expand All @@ -279,6 +289,11 @@ func (wa *WebAnalysis) ComputeTCPTransactionsWithUnexpectedTCPConnectFailures(c
continue
}

// skip cases where the root cause seems misconfigured IPv6
if analysisTCPConnectFailureSeemsMisconfiguredIPv6(obs) {
continue
}

// update state
state[obs.EndpointTransactionID.Unwrap()] = true
}
Expand Down Expand Up @@ -596,7 +611,10 @@ func (wa *WebAnalysis) ComputeTCPTransactionsWithUnexplainedUnexpectedFailures(c

// if we have a TCP connect measurement, the measurement failed, and we don't have
// a corresponding control measurement, we cannot explain this failure using the control
//
// while doing this, deal with misconfigured-IPv6 false positives
if !obs.TCPConnectFailure.IsNone() && obs.TCPConnectFailure.Unwrap() != "" &&
!analysisTCPConnectFailureSeemsMisconfiguredIPv6(obs) &&
obs.ControlTCPConnectFailure.IsNone() {
state[txid] = true
continue
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"DNSExperimentFailure": null,
"DNSTransactionsWithBogons": {},
"DNSTransactionsWithUnexpectedFailures": {},
"DNSPossiblyInvalidAddrs": {},
"HTTPDiffBodyProportionFactor": 0.6166324592304209,
"HTTPDiffStatusCodeMatch": true,
"HTTPDiffTitleDifferentLongWords": {},
"HTTPDiffUncommonHeadersIntersection": {
"accept-ch": true,
"alt-svc": true,
"cross-origin-opener-policy": true,
"origin-trial": true,
"permissions-policy": true,
"report-to": true
},
"HTTPFinalResponses": {
"8": true
},
"HTTPFinalResponsesWithTLS": {
"8": true
},
"TCPTransactionsWithUnexpectedTCPConnectFailures": {},
"TCPTransactionsWithUnexpectedTLSHandshakeFailures": {},
"TCPTransactionsWithUnexpectedHTTPFailures": {},
"TCPTransactionsWithUnexplainedUnexpectedFailures": {}
}
Loading

0 comments on commit 72b2be9

Please sign in to comment.