From f07bac2a4d2690bc2e788a32e77201edf05b9996 Mon Sep 17 00:00:00 2001 From: claudio Date: Thu, 3 Mar 2022 11:19:41 +0000 Subject: [PATCH] Remove the labelid from struct kroute_full. It was never really used. The label is passed as a string in kroute_full. Ok tb@ --- usr.sbin/bgpd/bgpd.h | 3 +-- usr.sbin/bgpd/kroute.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h index ad29858760c..a88b251baba 100644 --- a/usr.sbin/bgpd/bgpd.h +++ b/usr.sbin/bgpd/bgpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.h,v 1.420 2022/02/23 11:20:35 claudio Exp $ */ +/* $OpenBSD: bgpd.h,v 1.421 2022/03/03 11:19:41 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -674,7 +674,6 @@ struct kroute_full { struct bgpd_addr prefix; struct bgpd_addr nexthop; char label[RTLABEL_LEN]; - uint16_t labelid; uint16_t flags; u_short ifindex; uint8_t prefixlen; diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c index 6bba2f9fedb..c517c6843a4 100644 --- a/usr.sbin/bgpd/kroute.c +++ b/usr.sbin/bgpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.242 2022/02/06 09:51:19 claudio Exp $ */ +/* $OpenBSD: kroute.c,v 1.243 2022/03/03 11:19:41 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -1625,7 +1625,6 @@ kr_tofull(struct kroute *kr) kf.nexthop.aid = AID_INET; kf.nexthop.v4.s_addr = kr->nexthop.s_addr; strlcpy(kf.label, rtlabel_id2name(kr->labelid), sizeof(kf.label)); - kf.labelid = kr->labelid; kf.flags = kr->flags; kf.ifindex = kr->ifindex; kf.prefixlen = kr->prefixlen; @@ -1646,7 +1645,6 @@ kr6_tofull(struct kroute6 *kr6) kf.nexthop.aid = AID_INET6; memcpy(&kf.nexthop.v6, &kr6->nexthop, sizeof(struct in6_addr)); strlcpy(kf.label, rtlabel_id2name(kr6->labelid), sizeof(kf.label)); - kf.labelid = kr6->labelid; kf.flags = kr6->flags; kf.ifindex = kr6->ifindex; kf.prefixlen = kr6->prefixlen; -- 2.20.1