Skip to content

bgp udpgrp crash #21080

@anlancs

Description

@anlancs

Description

Thread 1 "bgpd" received signal SIGSEGV, Segmentation fault.
0x0000558b7ce5c113 in bgp_addpath_encode_tx (peer=0x0, afi=AFI_IP,
    safi=SAFI_UNICAST) at ../bgpd/bgp_updgrp.c:2346
2346            return (CHECK_FLAG(peer->af_cap[afi][safi], PEER_CAP_ADDPATH_AF_TX_ADV)
(gdb) bt
#0  0x0000558b7ce5c113 in bgp_addpath_encode_tx (peer=0x0, afi=AFI_IP,
    safi=SAFI_UNICAST) at ../bgpd/bgp_updgrp.c:2346
#1  0x0000558b7ce5d1ed in group_announce_route_walkcb (updgrp=0x558b7da53e00,
    arg=0x7fffed0958a0) at ../bgpd/bgp_updgrp_adv.c:230
#2  0x0000558b7ce5afcb in update_group_walkcb (bucket=0x558b7d9d7bd0,
    arg=0x7fffed095800) at ../bgpd/bgp_updgrp.c:1815
#3  0x00007f1b306bbdb0 in hash_walk (hash=0x558b7da22880,
    func=0x558b7ce5af8b <update_group_walkcb>, arg=0x7fffed095800)
    at ../lib/hash.c:272
#4  0x0000558b7ce5bbef in update_group_af_walk (bgp=0x558b7d9f7d40,
    afi=AFI_IP, safi=SAFI_UNICAST,
    cb=0x558b7ce5d19e <group_announce_route_walkcb>, ctx=0x7fffed0958a0)
    at ../bgpd/bgp_updgrp.c:2175
#5  0x0000558b7ce5f342 in group_announce_route (bgp=0x558b7d9f7d40,
    afi=AFI_IP, safi=SAFI_UNICAST, dest=0x558b7da7c0d0, pi=0x0)
    at ../bgpd/bgp_updgrp_adv.c:1192
#6  0x0000558b7ce15ebc in bgp_process_main_one (bgp=0x558b7d9f7d40,
    dest=0x558b7da7c0d0, afi=AFI_IP, safi=SAFI_UNICAST)
    at ../bgpd/bgp_route.c:4311
#7  0x0000558b7ce1733b in process_subq_other_route (dest=0x558b7da7c0d0)
    at ../bgpd/bgp_route.c:4790
#8  0x0000558b7ce174dd in process_subq (subq=0x558b7d9f5700,
    qindex=META_QUEUE_OTHER_ROUTE) at ../bgpd/bgp_route.c:4837
#9  0x0000558b7ce175c4 in meta_queue_process (dummy=0x558b7d9f78d0,
    data=0x558b7d319550) at ../bgpd/bgp_route.c:4873
#10 0x00007f1b3076bf2c in work_queue_run (event=0x7fffed095b70)
    at ../lib/workqueue.c:279
#11 0x00007f1b3075db4f in event_call (event=0x7fffed095b70)
    at ../lib/event.c:2730
#12 0x00007f1b306d23c2 in frr_run (loop=0x558b7d241720) at ../lib/libfrr.c:1258
#13 0x0000558b7cd50651 in main (argc=6, argv=0x7fffed095df8)
    at ../bgpd/bgp_main.c:549

Version

master branch

How to reproduce

router A:

router bgp 2
 bgp router-id 2.2.2.2
 no bgp ebgp-requires-policy
 bgp confederation identifier 66
 bgp confederation peers 3
 neighbor 192.168.2.2 remote-as 3

router B:

router bgp 3
 bgp router-id 3.3.3.3
 no bgp ebgp-requires-policy
 bgp confederation identifier 66
 bgp confederation peers 2
 neighbor 192.168.2.1 remote-as  2
 address-family ipv4 unicast
  redistribute connected // send some routes to router A

After the bgp confederation neighibor is established, then delete " bgp confederation identifier 66" in router A, it will trigger the segment fault.

Expected behavior

No segment fault.

Actual behavior

Segment fault

Additional context

No response

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNeeds further investigation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions