From: Fabrice Fontaine Date: Tue, 8 Nov 2022 17:48:41 +0000 (+0100) Subject: zebra/netconf_netlink.c: fix build without AF_MPLS X-Git-Tag: docker/8.4.1~10^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=eed83c07cc2c08d1b7eb33effa396d4732b20dc1;p=matthieu%2Ffrr.git zebra/netconf_netlink.c: fix build without AF_MPLS Fix the following build failure raised since version 8.4 and https://github.com/FRRouting/frr/commit/d53dc9bd8164ba40242e2013d382fb01eb0b96ed: zebra/netconf_netlink.c: In function 'netlink_netconf_change': zebra/netconf_netlink.c:109:32: error: 'AF_MPLS' undeclared (first use in this function) 109 | if (ncm->ncm_family == AF_MPLS) | ^~~~~~~ Signed-off-by: Fabrice Fontaine (cherry picked from commit fa60f2c2fac9ff6d71e8bddab92f78a6d558035b) --- diff --git a/zebra/netconf_netlink.c b/zebra/netconf_netlink.c index 56f56bfe66..4c30544e5d 100644 --- a/zebra/netconf_netlink.c +++ b/zebra/netconf_netlink.c @@ -106,9 +106,11 @@ int netlink_netconf_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) * to do a good job of not sending data that is mixed/matched * across families */ +#ifdef AF_MPLS if (ncm->ncm_family == AF_MPLS) afi = AFI_IP; else +#endif /* AF_MPLS */ afi = family2afi(ncm->ncm_family); netlink_parse_rtattr(tb, NETCONFA_MAX, netconf_rta(ncm), len);