Commit Diff


commit - 96a874b067dad9a5704171d9c63a5594b6d42e3d
commit + fa32a75741dba59c89d92757937ef9039129dea1
blob - a80d57737405406ce3d79c7ec9bb6dc5fc4787ca
blob + 6031e234406a2f1fae937eec38a27f50b6436e6e
--- sdp/sdp.go
+++ sdp/sdp.go
@@ -309,7 +309,7 @@ func parseMedia(s string) (Media, error) {
 // ConnInfo represents connection information.
 type ConnInfo struct {
 	Address netip.Addr
-	// TTL is the time-to-live of multicast packets.
+	// TTL is the time-to-live of IPv4 multicast packets.
 	TTL uint8
 	// Count is the number of subsequent IP addresses after
 	// Address used in the session.
@@ -322,7 +322,7 @@ func (c *ConnInfo) String() string {
 		ipv = "IP4"
 	}
 	s := fmt.Sprintf("c=%s %s %s", "IN", ipv, c.Address)
-	if c.TTL > 0 {
+	if c.Address.Is4() && c.TTL > 0 {
 		s += fmt.Sprintf("/%d", c.TTL)
 	}
 	if c.Count > 0 {