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 9, 2024
1 parent b2af663 commit a520524
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions sdp.go
Original file line number Diff line number Diff line change
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 a520524

Please sign in to comment.