Linux is driving me nuts. The mix of net/, netinet/ includes and the need to also include some linux/ headers like linux/if.h and linux/in6.h result in absolute madness. Try to trim the includes in bgpd.h by defining our own label size for route labels.
With this the net/route.h compat shim can die. Won't probably help my real issue but one thing less to juggle. Naming is pain, I went with ROUTELABEL_LEN other option is BGPDLABEL_LEN or maybe someone else has a good idea -- :wq Claudio Index: bgpd.h =================================================================== RCS file: /cvs/src/usr.sbin/bgpd/bgpd.h,v retrieving revision 1.453 diff -u -p -r1.453 bgpd.h --- bgpd.h 21 Sep 2022 21:12:03 -0000 1.453 +++ bgpd.h 23 Sep 2022 09:51:23 -0000 @@ -22,7 +22,6 @@ #include <sys/socket.h> #include <sys/queue.h> #include <sys/tree.h> -#include <net/route.h> #include <netinet/in.h> #include <arpa/inet.h> #include <net/if.h> @@ -41,6 +40,7 @@ #define PEER_DESCR_LEN 32 #define REASON_LEN 256 /* includes NUL terminator */ #define PFTABLE_LEN 32 +#define ROUTELABEL_LEN 32 #define TCP_MD5_KEY_LEN 80 #define IPSEC_ENC_KEY_LEN 32 #define IPSEC_AUTH_KEY_LEN 20 @@ -705,7 +705,7 @@ struct ktable { struct kroute_full { struct bgpd_addr prefix; struct bgpd_addr nexthop; - char label[RTLABEL_LEN]; + char label[ROUTELABEL_LEN]; uint32_t mplslabel; uint16_t flags; u_short ifindex; @@ -1117,7 +1117,7 @@ struct filter_set { struct nexthop *nh_ref; struct community community; char pftable[PFTABLE_LEN]; - char rtlabel[RTLABEL_LEN]; + char rtlabel[ROUTELABEL_LEN]; uint8_t origin; } action; enum action_types type;