Hi Yusuke, I did: diff --git a/netlink/librtnl/netns.c b/netlink/librtnl/netns.c index 1b40227..f899f28 100644 --- a/netlink/librtnl/netns.c +++ b/netlink/librtnl/netns.c @@ -66,7 +66,7 @@ u8 *format_ns_link (u8 *s, va_list *args) #define ns_foreach_rta \ _(RTA_DST, dst, 1) \ _(RTA_SRC, src, 1) \ - _(RTA_VIA, via, 1) \ + _(__RH_RESERVED_RTA_VIA, via, 1) \ _(RTA_GATEWAY, gateway, 1) \ _(RTA_IIF, iif, 1) \ _(RTA_OIF, oif, 1) \ diff --git a/netlink/librtnl/rtnl.c b/netlink/librtnl/rtnl.c index 14ea0e8..2d22bd5 100644 --- a/netlink/librtnl/rtnl.c +++ b/netlink/librtnl/rtnl.c @@ -263,7 +263,7 @@ static int rtnl_socket_open(rtnl_ns_t *ns) .nl_groups = grpmask(RTNLGRP_LINK)| grpmask(RTNLGRP_IPV6_IFADDR) | grpmask(RTNLGRP_IPV4_IFADDR) | grpmask(RTNLGRP_IPV4_ROUTE) | grpmask(RTNLGRP_IPV6_ROUTE) | grpmask(RTNLGRP_NEIGH) | - grpmask(RTNLGRP_NOTIFY) | grpmask(RTNLGRP_MPLS_ROUTE), + grpmask(RTNLGRP_NOTIFY) | grpmask(__RH_RESERVED_RTNLGRP_MPLS_ROUTE), }; if (bind(ns->rtnl_socket, (struct sockaddr*) &addr, sizeof(addr))) { diff --git a/router/Makefile.am b/router/Makefile.am index b9de6a1..d16f103 100644 --- a/router/Makefile.am +++ b/router/Makefile.am @@ -1,6 +1,6 @@ AUTOMAKE_OPTIONS = foreign subdir-objects -AM_CFLAGS = -Wall -I@TOOLKIT_INCLUDE@ +AM_CFLAGS = -std=gnu99 -Wall -I@TOOLKIT_INCLUDE@ lib_LTLIBRARIES = router.la router_la_SOURCES = router/tap_inject.c \ diff --git a/router/router/tap_inject_netlink.c b/router/router/tap_inject_netlink.c index 3dca013..8f30216 100644 --- a/router/router/tap_inject_netlink.c +++ b/router/router/tap_inject_netlink.c @@ -33,6 +33,14 @@ #include <linux/mpls.h> #include <vnet/mpls/packet.h> +#define AF_MPLS 28 /* MPLS */ + +/* RTA_VIA */ +struct rtvia { + __kernel_sa_family_t rtvia_family; + __u8 rtvia_addr[0]; +}; + static void add_del_addr (ns_addr_t * a, int is_del) {
But when I tried to use it with lacp I got: rtnl_ns_recv:398: Received notification while in sync. Restart synchronization. rtnl_process_read:462: rtnetlink recv error (29) []: Bad file descriptor -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#9357): https://lists.fd.io/g/vpp-dev/message/9357 View All Messages In Topic (3): https://lists.fd.io/g/vpp-dev/topic/19740620 Mute This Topic: https://lists.fd.io/mt/19740620/21656 New Topic: https://lists.fd.io/g/vpp-dev/post Change Your Subscription: https://lists.fd.io/g/vpp-dev/editsub/21656 Group Home: https://lists.fd.io/g/vpp-dev Contact Group Owner: vpp-dev+ow...@lists.fd.io Terms of Service: https://lists.fd.io/static/tos Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub -=-=-=-=-=-=-=-=-=-=-=-