Project

General

Profile

Actions

Bug #11271

closed
CL JP

Setting default-originate in FRR/BGP Silently Appends a route-map

Bug #11271: Setting default-originate in FRR/BGP Silently Appends a route-map

Added by Chris Linstruth over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
FRR
Target version:
-
Start date:
01/20/2021
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
2.4.5-p1
Affected Plus Version:
Affected Architecture:

Description

When setting default-priginate on a BGP neighbor thew user is presented with four choices by default:

  • No
  • IPv4
  • IPv6
  • IPv4+6

Appended to that list are any route maps the administrator has created. These selections add the following lines to the neighbor configuration:

No: No default-originate line added
IPv4: neighbor 172.25.228.5 default-originate route-map ipv4
IPv6: neighbor 172.25.228.5 default-originate route-map ipv6
IPv4+IPv6: neighbor 172.25.228.5 default-originate

The IPv4 and IPv6 selections will filter the route unless the administrator manually creates the ipv4 or ipv6 route maps. This is added silently, however, and there is no clue the default-originate is being filtered by a route map.

Selecting IPv4+IPv6 announces the route but it is counter-intuitive for someone creating an IPv4-only peer to select IPv4+IPv6, and vice-versa.

Maybe it would be better to just have a checkbox to add default-originate with the option to add a route map from a list of configured route maps or not?

Thank you.

VG Updated by Viktor Gurov over 5 years ago Actions #1

Selecting IPv4+IPv6 announces the route but it is counter-intuitive for someone creating an IPv4-only peer to select IPv4+IPv6, and vice-versa.

no such issue on 2.5 branch (frr 0.6.8_8),
fixed in #10789 (https://github.com/pfsense/FreeBSD-ports/pull/942):

 address-family ipv4 unicast
  neighbor 172.16.16.2 activate
  neighbor 172.16.16.2 default-originate  
  ...
 exit-address-family
 !
 address-family ipv6 unicast
  neighbor 172.16.16.2 activate
  neighbor 172.16.16.2 default-originate
  ...

see also #11039

CL Updated by Chris Linstruth over 5 years ago Actions #2

Looks like 2.5.0 still appends a route-map to me.

 address-family ipv4 unicast
  neighbor 192.168.1.1 activate
  neighbor 192.168.1.1 default-originate  route-map ipv4  
  no neighbor 192.168.1.1 send-community
 exit-address-family

GP Updated by George Phillips over 5 years ago Actions #3

Basically, that drop-down menu should be empty unless the user defines their own route-maps. The ipv4, ipv6, and ipv4+ipv6 route maps do not exist and should not be options in the drop-down.

BH Updated by Ben Hughes over 5 years ago Actions #4

Yeh it's a bug, if you select IPv4+IPv6 then it'll work as expected but everything else it'll interpret at a route map.

I'll put a PR in to fix it shortly.

BH Updated by Ben Hughes over 5 years ago Actions #5

George Phillips wrote:

Basically, that drop-down menu should be empty unless the user defines their own route-maps. The ipv4, ipv6, and ipv4+ipv6 route maps do not exist and should not be options in the drop-down.

It's not that simple, they do need to exist for people that want to select default-originate without a route-map and possibly per address family. That's why they're there, but the selection logic isn't the best.

CL Updated by Chris Linstruth over 5 years ago Actions #6

I suggest a checkbox to enable default-originate and a pulldown that lists the route maps for OPTIONAL inclusion.

BH Updated by Ben Hughes over 5 years ago Actions #8

Chris Linstruth wrote:

I suggest a checkbox to enable default-originate and a pulldown that lists the route maps for OPTIONAL inclusion.

I've split the route-map to a separate selection, the default-originate selection now just controls which address family it is set in.

JP Updated by Jim Pingle over 5 years ago Actions #9

  • Status changed from New to Pull Request Review

CL Updated by Chris Linstruth over 5 years ago Actions #10

Shouldn't there be a separate route map selection for each address family?

BH Updated by Ben Hughes over 5 years ago Actions #11

Chris Linstruth wrote:

Shouldn't there be a separate route map selection for each address family?

You can match both families in a single route map as long as the match statements are in separate sequences.

CL Updated by Chris Linstruth over 5 years ago Actions #12

I know you can but why limit the configuration in such a fashion?

Checkbox for enabling default-originate IPv4 with an optional route map
Checkbox for enabling default-originate IPv6 with an optional route map

If the administrator wants them to be the same route map like it is now they can set the same route map in each family.

RB Updated by Renato Botelho over 5 years ago Actions #13

  • Status changed from Pull Request Review to Feedback

PR has been merged. Thanks!

CL Updated by Chris Linstruth over 5 years ago Actions #14

This works as expected for one route map spanning both families. Much better. Thank you.

RB Updated by Renato Botelho over 5 years ago Actions #15

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom