Subject: [MMUSIC] ICE SDP candidate attribute grammar tweak

From: Jonathan Lennox <[email-masked]>
Date: Thu, 1 Dec 2016 22:05:24 +0000

I noticed that the grammar of candidate-attribute in ICE SDP says

   candidate-attribute   = "candidate" ":" foundation SP component-id SP
                           transport SP
                           priority SP
                           connection-address SP     ;from RFC 4566<https://tools.ietf.org/html/rfc4566>
                           port         ;port from RFC 4566<https://tools.ietf.org/html/rfc4566>
                           SP cand-type
                           [SP rel-addr]
                           [SP rel-port]
                           *(SP extension-att-name SP
                                extension-att-value)

This grammar means that rel-addr and rel-port are both optional, independently.

However, this isn’t actually correct according to the text — a candidate must either have both rel-addr and rel-port (if it’s reflexive or relay), or neither (if it’s host).

Thus, I think the grammar should instead say [SP rel-addr SP rel-port].

(This part of the grammar is the same as RFC 5245.)