]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra/netconf_netlink.c: fix build without AF_MPLS 12290/head
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Tue, 8 Nov 2022 17:48:41 +0000 (18:48 +0100)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Wed, 9 Nov 2022 05:25:17 +0000 (05:25 +0000)
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 <fontaine.fabrice@gmail.com>
(cherry picked from commit fa60f2c2fac9ff6d71e8bddab92f78a6d558035b)

zebra/netconf_netlink.c

index 56f56bfe669d2df7d89855fe56ec5a5acf463021..4c30544e5df472d4f33dd9767024ba98a276ac39 100644 (file)
@@ -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);