From: claudio Date: Wed, 19 Apr 2023 09:03:00 +0000 (+0000) Subject: Add minimal support for flowspec in the table-mp MRT format. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=211fe81c234be826d24047e5d0f0a70dae72b045;p=openbsd Add minimal support for flowspec in the table-mp MRT format. In general people should use table-v2 which handles flowspec just fine. OK tb@ --- diff --git a/usr.sbin/bgpd/mrt.c b/usr.sbin/bgpd/mrt.c index d24cf3765a3..e0c94d1f236 100644 --- a/usr.sbin/bgpd/mrt.c +++ b/usr.sbin/bgpd/mrt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mrt.c,v 1.113 2023/03/28 15:17:34 claudio Exp $ */ +/* $OpenBSD: mrt.c,v 1.114 2023/04/19 09:03:00 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker @@ -488,6 +488,15 @@ mrt_dump_entry_mp(struct mrt *mrt, struct prefix *p, uint16_t snum, 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;