Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default policy if statement was not found #2759

Open
sebasttiano opened this issue Jan 17, 2024 · 1 comment
Open

Default policy if statement was not found #2759

sebasttiano opened this issue Jan 17, 2024 · 1 comment

Comments

@sebasttiano
Copy link

sebasttiano commented Jan 17, 2024

Hi, everybody.

Is it correct that gobgp starts with default policies (no policies) if some set for example is missing in the config by mistake?

Part of the config:

 ........
  defined-sets:
    neighbor-sets:
      - neighbor-set-name: all_borders
         neighbor-info-list: ['10.12.3.1']
 ......
      - name: flowspec_to_universal_routers
        conditions:
          match-neighbor-set:
            neighbor-set: universal_routers                <---- missing in neighbor-sets statement
            match-set-options: any
          bgp-conditions:
            match-large-community-set:
              large-community-set: common_access_flowspec
              match-set-options: any
            afi-safi-in-list: ['ipv4-flowspec']
        actions:
          route-disposition: accept-route
          bgp-actions:
            set-large-community:
              options: remove
              set-large-community-method:
                communities-list: ['902:902:902']
   .....

For example, universal_routers is missing in the neighbor-set, this leads to an error at startup:
{"Error":"not found neighbor set universal_routers","Topic":"Policy","level":"error","msg":"failed to create routing policy","time":"2024-01-17T15:19:05+01:00"}

But gobgp still runs without any policy at all, which leads to unexpected behavior

What I expect from gobgp: not to run with invalid config

@fujita
Copy link
Member

fujita commented Jan 29, 2024

Please send a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants