]> git.proxmox.com Git - mirror_frr.git/commit - zebra/zebra_fpm_netlink.c
zebra_fpm: Add support for other protocols in fpm:netlink
authorSpoorthi K <spk@redhat.com>
Mon, 23 Jan 2023 03:34:04 +0000 (09:04 +0530)
committerSpoorthi K <spk@redhat.com>
Tue, 24 Jan 2023 04:18:21 +0000 (09:48 +0530)
commit4a563f2714e90a4426dd7922ee0f42404cc7c3cd
treef85ad21272744cd542fedf02cce7b1bebaa92f76
parentde2e2d5ef09477ff03c17c18eeb1b2cb8da80f84
zebra_fpm: Add support for other protocols in fpm:netlink

    fpm:netlink format doesn't indicate the protocol information
    in routes of BGP, OSPF and other protocols. Routes of those
    protocols just indicate protocol as zebra.

    The below route is actually BGP route but 'proto': 11
    indicates that it is zebra.

    {'attrs': [('RTA_DST', 'dummy'),
               ('RTA_PRIORITY', 0),
               ('RTA_GATEWAY', 'dummy'),
               ('RTA_OIF', 2)],
     'dst_len': 32,
     'family': 2,
     'flags': 0,
     'header': {'flags': 1025,
                'length': 60,
                'pid': 3160253895,
                'sequence_number': 0,
                'type': 24},
     'proto': 11,
     'scope': 0,
     'src_len': 0,
     'table': 254,
     'tos': 0,
     'type': 1}

    with this change it is now seen with 'proto': 186
    indicates that it is BGP.

    {'attrs': [('RTA_DST', 'dummy'),
               ('RTA_PRIORITY', 0),
               ('RTA_GATEWAY', 'dummy'),
               ('RTA_OIF', 2)],
     'dst_len': 32,
     'family': 2,
     'flags': 0,
     'header': {'flags': 1025,
                'length': 60,
                'pid': 3160253895,
                'sequence_number': 0,
                'type': 24},
     'proto': 186,
     'scope': 0,
     'src_len': 0,
     'table': 254,
     'tos': 0,
     'type': 1}

Signed-off-by: Spoorthi K <spk@redhat.com>
zebra/rt_netlink.c
zebra/rt_netlink.h
zebra/zebra_fpm_netlink.c