FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.29k stars 1.25k forks source link

ripngd "ipv6 distribute-list [prefix] LISTNAME" command does not use LISTNAME as the distribute list #10326

Closed Supermathie closed 2 years ago

Supermathie commented 2 years ago

Describe the bug

ripng seems to have a parsing bug that affects our use. The following configuration (working a-ok on quagga ripngd 1.2.4-3) failed silently under frr:

router ripng
 network eth0
 passive-interface docker0
 redistribute connected
 timers basic 15 900 120
 ipv6 distribute-list prefix redistribute-list out
!
ipv6 prefix-list redistribute-list seq 5 permit 2001:db8:100::/64
!

Specifically, the ipv6 distribute-list command is parsed incorrectly. The original lines:

router ripng
 ipv6 distribute-list prefix redistribute-list out
ipv6 prefix-list redistribute-list seq 5 permit 2001:db8:100::/64

are reflected in live configuration as:

# sh run
...
router ripng                                                 
 ipv6 distribute-list prefix prefix out
ipv6 prefix-list redistribute-list seq 5 permit 2001:db8:100::/64

and:

host1# sh ipv6 ripng status
Routing Protocol is "RIPng"
  Outgoing update filter list for all interface is (prefix-list) prefix

It seems that the parser erroneously uses the previous word atom as the name of the list. Similarly, the line:

 ipv6 distribute-list redistribute-list out

reflects in live configuration as:

 ipv6 distribute-list distribute-list out

[x] Did you check if this is a duplicate issue? [ ] Did you test it on the latest FRRouting/frr master branch?

To Reproduce

  1. use ipv6 distribute-list prefix LISTNAME out with a LISTNAME other than "prefix", or
  2. use ipv6 distribute-list LISTNAME out with a LISTNAME other than "distribute-list"

Expected behavior

The configured distribute-list should be LISTNAME, not "prefix" or "distribute-list"

Versions

FRR VERSION: debian package 6.0.2-2+deb10u1 OPERATING SYSTEM VERSION: Debian 10 KERNEL VERSION: 4.19.0-12-amd64 #1 SMP Debian 4.19.152-1 (2020-10-18)

Supermathie commented 2 years ago

We are working around this bug in production by using prefix as our list name - fortunately a single list is sufficient for our use case.

donaldsharp commented 2 years ago

I am not seeing this in latest version of FRR:

eva# conf
eva(config)# router ripng
eva(config-router)# ipv6 distribute-list 
  ACCESSLIST6_NAME  Access-list name
  prefix            Specify a prefix
eva(config-router)# ipv6 distribute-list prefix 
  ACCESSLIST6_NAME  Access-list name
  in                Filter incoming routing updates
  out               Filter outgoing routing updates
eva(config-router)# ipv6 distribute-list prefix redistribute-list out
eva(config-router)# end
eva# show run
Building configuration...

Current configuration:
!
frr version 8.2-dev
frr defaults traditional
hostname eva
!
router ripng
 ipv6 distribute-list prefix redistribute-list out 
exit
!
end
eva# show ipv6 ripng status
Routing Protocol is "RIPng"
  Sending updates every 30 seconds with +/-50%, next due in 0 seconds
  Timeout after 180 seconds, garbage collect after 120 seconds
  Outgoing update filter list for all interface is (prefix-list) redistribute-list
  Incoming update filter list for all interface is not set
  Default redistribution metric is 1
  Redistributing:
  Default version control: send version 1, receive version 1 
    Interface        Send  Recv
  Routing for Networks:
  Routing Information Sources:
    Gateway          BadPackets BadRoutes  Distance Last Update
eva# conf
eva(config)# ipv6 prefix-list redistribute-list seq 5 permit 2001:db8:100::/64
eva(config)# end
eva# show run
Building configuration...

Current configuration:
!
frr version 8.2-dev
frr defaults traditional
hostname eva
!
router ripng
 ipv6 distribute-list prefix redistribute-list out 
exit
!
ipv6 prefix-list redistribute-list seq 5 permit 2001:db8:100::/64
!
end
eva# 

6.0 was released in 2018. Can you try a newer version?

ton31337 commented 2 years ago

@frrbot autoclose in 1 week.

frrbot[bot] commented 2 years ago

This issue will be automatically closed in the specified period unless there is further activity.

Supermathie commented 2 years ago

We'll do so (upgrading to debian 11 and we'll get a newer version) and let you know (cc: @fitzy101)

frrbot[bot] commented 2 years ago

This issue will no longer be automatically closed.

ton31337 commented 2 years ago

@frrbot autoclose in 1 week.

frrbot[bot] commented 2 years ago

This issue will be automatically closed in the specified period unless there is further activity.