only take udp candidates from transport-info

Daniel Gultsch created

Change summary

src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/IceUdpTransportInfo.java | 3 
1 file changed, 3 insertions(+)

Detailed changes

src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/IceUdpTransportInfo.java 🔗

@@ -194,6 +194,9 @@ public class IceUdpTransportInfo extends GenericTransportInfo {
             checkNotNullNoWhitespace(component, "component");
             final String transport = this.getAttribute("protocol");
             checkNotNullNoWhitespace(transport, "protocol");
+            if (!"udp".equals(transport)) {
+                throw new IllegalArgumentException(String.format("'%s' is not a supported protocol", transport));
+            }
             final String priority = this.getAttribute("priority");
             checkNotNullNoWhitespace(priority, "priority");
             final String connectionAddress = this.getAttribute("ip");