Skip to content

Commit

Permalink
cmd/gobgp: fix parseEvpnEthernetAutoDiscoveryArgs
Browse files Browse the repository at this point in the history
esi-label follows the format:
   [esi-label <esi-label> [single-active | all-active]]

extractReserved() splits by spaces, returning a list for esi-label, hence
failing the type check.

Change its parameter value type to paramList to be able to accomodate cases
such as "... esi-label 400 single-active".
  • Loading branch information
costasd committed Jun 6, 2023
1 parent 0ab4550 commit a0e9ab2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/gobgp/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ func parseEvpnEthernetAutoDiscoveryArgs(args []string) (bgp.AddrPrefixInterface,
"rd": paramSingle,
"rt": paramList,
"encap": paramSingle,
"esi-label": paramSingle})
"esi-label": paramList})
if err != nil {
return nil, nil, err
}
Expand Down

0 comments on commit a0e9ab2

Please sign in to comment.