]> git.puffer.fish Git - matthieu/frr.git/commit
ripd: Fix malformed route-map
authoranlan_cs <vic.lan@pica8.com>
Sun, 2 Apr 2023 00:33:25 +0000 (08:33 +0800)
committeranlan_cs <vic.lan@pica8.com>
Mon, 3 Apr 2023 02:48:33 +0000 (10:48 +0800)
commitff0fa00c7d76af64fa4dbc35b17cccaba969e822
tree3162c22ca2a9c26ccdc45d36d5c727f06e8caa65
parentc4e3d5569f56faf615a6177aadc6e614dd88684c
ripd: Fix malformed route-map

Currently the process of the `route-map` configuration for `per-vrf-rip`
is wrong.

There are two problems:
1. `ctx->name` for `if_rmap_ctx`  is not initialized in `if_rmap_ctx_create()`.
2.  The global `if_rmap_ctx_list` is wrongly used for `per-vrf-rip`.

So, two changes for it:
1. Correctly initializes `ctx->name`.
2. Use specific `if_rmap_ctx` for `per-vrf-rip`, not global one.

Note, this related implementation for `route-map` is only for `ripd`.

Before:
```
anlan(config)# route rip vrf vrf1
anlan(config-router)# route-map aa in lan
anlan(config-router)# do show run
!
router rip
 route-map aa in lan
exit
!
```

After:
```
anlan(config)# route rip vrf vrf1
anlan(config-router)# route-map aa in lan
anlan(config-router)# do show run
!
router rip vrf vrf1
 route-map aa in lan
exit
!
```

Signed-off-by: anlan_cs <vic.lan@pica8.com>
lib/if_rmap.c