On Wed, Apr 19, 2023 at 10:49:38AM +0200, Claudio Jeker wrote:
> Implement the minimum to support flowspec in mrt mp table dumps.
> This adds a dummy nexthop encoding for flowspec (there is no nexthop).
>
> Not sure if this matters (dumping tables in anything than the v2 table
> format for non-IPv4/IPv6 prefixes is not common) but it prevents a
> log_warnx() if used.
ok tb
> --
> :wq Claudio
>
> Index: mrt.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/bgpd/mrt.c,v
> retrieving revision 1.113
> diff -u -p -r1.113 mrt.c
> --- mrt.c 28 Mar 2023 15:17:34 -0000 1.113
> +++ mrt.c 19 Apr 2023 08:45:02 -0000
> @@ -488,6 +488,15 @@ mrt_dump_entry_mp(struct mrt *mrt, struc
> goto fail;
> }
> break;
> + case AID_FLOWSPECv4:
> + case AID_FLOWSPECv6:
> + if (p->pt->aid == AID_FLOWSPECv4)
> + DUMP_SHORT(h2buf, AFI_IPv4); /* afi */
> + else
> + DUMP_SHORT(h2buf, AFI_IPv6); /* afi */
> + DUMP_BYTE(h2buf, SAFI_FLOWSPEC); /* safi */
> + DUMP_BYTE(h2buf, 0); /* nhlen */
> + break;
> default:
> log_warnx("king bula found new AF in %s", __func__);
> goto fail;
>