Skip to content

Commit

Permalink
Skip some checks when BUNDLE group value is found
Browse files Browse the repository at this point in the history
Resolves #2621
  • Loading branch information
stephanrotolante authored and Sean-Der committed Apr 8, 2024
1 parent bd25613 commit 6d13523
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions sdp.go
Expand Up @@ -709,8 +709,13 @@ func extractFingerprint(desc *sdp.SessionDescription) (string, string, error) {
return "", "", ErrSessionDescriptionNoFingerprint
}

// https://github.com/pion/webrtc/issues/2621
groupAttribue, _ := desc.Attribute(sdp.AttrKeyGroup)

isBundled := strings.Contains(groupAttribue, "BUNDLE")

for _, m := range fingerprints {
if m != fingerprints[0] {
if m != fingerprints[0] && !isBundled {
return "", "", ErrSessionDescriptionConflictingFingerprints
}
}
Expand Down Expand Up @@ -769,14 +774,19 @@ func extractICEDetails(desc *sdp.SessionDescription, log logging.LeveledLogger)
return "", "", nil, ErrSessionDescriptionMissingIcePwd
}

// https://github.com/pion/webrtc/issues/2621
groupAttribue, _ := desc.Attribute(sdp.AttrKeyGroup)

isBundled := strings.Contains(groupAttribue, "BUNDLE")

for _, m := range remoteUfrags {
if m != remoteUfrags[0] {
if m != remoteUfrags[0] && !isBundled {
return "", "", nil, ErrSessionDescriptionConflictingIceUfrag
}
}

for _, m := range remotePwds {
if m != remotePwds[0] {
if m != remotePwds[0] && !isBundled {
return "", "", nil, ErrSessionDescriptionConflictingIcePwd
}
}
Expand Down

0 comments on commit 6d13523

Please sign in to comment.