Skip to content

Commit

Permalink
zebra/netconf_netlink.c: fix build without AF_MPLS
Browse files Browse the repository at this point in the history
Fix the following build failure raised since version 8.4 and
d53dc9b:

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 <[email protected]>
  • Loading branch information
ffontaine committed Nov 8, 2022
1 parent 473f991 commit fa60f2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions zebra/netconf_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fa60f2c

Please sign in to comment.