[BGPCEP-851] PCEP base parser is unable to handle multiple ERO Created: 28/Nov/18 Updated: 03/Mar/19 Due: 31/Dec/18 Resolved: 06/Dec/18 |
|
| Status: | Verified |
| Project: | bgpcep |
| Component/s: | PCEP |
| Affects Version/s: | Bugzilla Migration |
| Fix Version/s: | Neon, Fluorine SR2 |
| Type: | Bug | Priority: | High |
| Reporter: | Olivier Dugeon | Assignee: | Olivier Dugeon |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0 minutes | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | 1 hour | ||
| Attachments: |
|
| Priority: | High |
| Description |
|
When sending a PCReply message with more than one ERO object, as per RFC540, the PCEP base parser start infinite loop and stop with a java heap exception. The problem is located in PCEPReplyMessageParser.java (pcep-base-parser package) at line 217 in handleEro() method. handleEro() is called with the first ERO object and remaining object to parse metrics associated with this ERO. The parsing is done by parserPath() method, but this method expect to fin only metrics object. When a second ERO follow the last metric of the first ERO, parsePath() method do nothing and handleEro() method start infinite loop at line 220 as the object list is not empty and parsePath() will not empty it. Patch is provide below and submitted. |
| Comments |
| Comment by Claudio David Gasparini [ 28/Nov/18 ] |
|
Hi odd22, thanks for the contribution. Could you please add test coverage, or update corresponding test to cover such scenario.
Thanks |
| Comment by Olivier Dugeon [ 30/Nov/18 ] |
|
Hi Claudio Done and submitted to gerrit. Olivier |