Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:19
erlang
3001-megaco-Mini-text-parser-IPv6-address-failu...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 3001-megaco-Mini-text-parser-IPv6-address-failure.patch of Package erlang
From 0c1d76bf92f902073b8efa503c8115cd247af245 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Tue, 28 Apr 2020 17:31:26 +0200 Subject: [PATCH 1/2] [megaco] Mini text parser IPv6 address failure The mini decoder could handle all kinds of IPv6 addresses. The reason for this was that the som of the chars (a and e) in the short form was interpreted as 'AddToken' and 'EventsToke' respectively, which the mini parser could not handle. ABNF for the mId (only the IPv6 version): mId = (( domainAddress / domainName ) [":" portNumber]) / mtpAddress / deviceName domainAddress = "[" (IPv4address / IPv6address) "]" IPv6address = hexpart [ ":" IPv4address ] hexpart = hexseq "::" [ hexseq ] / "::" [ hexseq ] / hexseq hexseq = hex4 *( ":" hex4) hex4 = 1*4HEXDIG HEXDIG = ( DIGIT / "A" / "B" / "C" / "D" / "E" / "F" ) DIGIT = %x30-39 ; 0-9 Example: [2409:8050:5005:1243:1011::a] The final 'a' (or 'e') caused it to fail. OTP-16631 --- lib/megaco/src/text/megaco_text_mini_parser.yrl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/megaco/src/text/megaco_text_mini_parser.yrl b/lib/megaco/src/text/megaco_text_mini_parser.yrl index af3050a05b..2a4041867e 100644 --- a/lib/megaco/src/text/megaco_text_mini_parser.yrl +++ b/lib/megaco/src/text/megaco_text_mini_parser.yrl @@ -77,7 +77,7 @@ Nonterminals Terminals - %% 'AddToken' + 'AddToken' %% 'AndAUDITselectToken' 'AuditCapToken' 'AuditToken' @@ -106,7 +106,7 @@ Terminals %% 'EmergencyValueToken' 'ErrorToken' %% 'EventBufferToken' - %% 'EventsToken' + 'EventsToken' %% 'ExternalToken' 'FailoverToken' 'ForcedToken' @@ -273,7 +273,7 @@ pathName -> safeToken : ensure_pathName('$1') . safeToken -> safeToken2 : make_safe_token('$1') . -%% safeToken2 -> 'AddToken' : '$1' . +safeToken2 -> 'AddToken' : '$1' . safeToken2 -> 'AuditToken' : '$1' . safeToken2 -> 'AuditCapToken' : '$1' . safeToken2 -> 'AuditValueToken' : '$1' . @@ -298,7 +298,7 @@ safeToken2 -> 'EmbedToken' : '$1' . %% safeToken2 -> 'EmergencyOffToken' : '$1' . safeToken2 -> 'ErrorToken' : '$1' . %% safeToken2 -> 'EventBufferToken' : '$1' . -%% safeToken2 -> 'EventsToken' : '$1' . +safeToken2 -> 'EventsToken' : '$1' . %% safeToken2 -> 'ExternalToken' : '$1' . % v3 safeToken2 -> 'FailoverToken' : '$1' . safeToken2 -> 'ForcedToken' : '$1' . -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor