mirror of
https://github.com/osrg/gobgp.git
synced 2024-05-11 05:55:10 +00:00
policy: check duplicated policy name
Signed-off-by: ISHIDA Wataru <[email protected]>
This commit is contained in:
@@ -2804,6 +2804,9 @@ func (r *RoutingPolicy) Reload(c config.RoutingPolicy) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, ok := pmap[y.Name()]; ok {
|
||||
return fmt.Errorf("duplicated policy name. policy name must be unique.")
|
||||
}
|
||||
pmap[y.Name()] = y
|
||||
for _, s := range y.Statements {
|
||||
_, ok := smap[s.Name]
|
||||
|
||||
Reference in New Issue
Block a user