dylanaraps / eiwd

iwd without dbus
GNU Lesser General Public License v2.1
47 stars 3 forks source link

external-ell needs patching #2

Closed charIes17 closed 4 years ago

charIes17 commented 4 years ago

Using the enable-external-ell option presently fails according to »**undefined reference to `lrtnl***«

I am about to create an ebuild for Gentoo and it turns out the following patch to (latest Git checkout of) external ell is needed to make it work.

The patch isn't accepted here as an attachment, so I will paste the content: http://dpaste.com/39PAKJW

diff --git a/ell/ell.sym b/ell/ell.sym index 0c83b87..aaeb8d5 100644 --- a/ell/ell.sym +++ b/ell/ell.sym @@ -20,6 +20,26 @@ global: l_util_hexdumpv; l_util_debug; l_util_get_debugfs_path;

+#include "private.h"

include "util.h"

include "netlink.h"

include "log.h"

@@ -132,7 +133,7 @@ static void l_rtnl_route_extract(const struct rtmsg *rtmsg, uint32_t len, } }

-uint32_t l_rtnl_set_linkmode_and_operstate(struct l_netlink rtnl, int ifindex, +LIB_EXPORT uint32_t l_rtnl_set_linkmode_and_operstate(struct l_netlink rtnl, int ifindex, uint8_t linkmode, uint8_t operstate, l_netlink_command_func_t cb, void user_data, @@ -165,7 +166,7 @@ uint32_t l_rtnl_set_linkmode_and_operstate(struct l_netlink rtnl, int ifindex, return id; }

-uint32_t l_rtnl_set_mac(struct l_netlink rtnl, int ifindex, +LIB_EXPORT uint32_t l_rtnl_set_mac(struct l_netlink rtnl, int ifindex, const uint8_t addr[static 6], bool power_up, l_netlink_command_func_t cb, @@ -202,7 +203,7 @@ uint32_t l_rtnl_set_mac(struct l_netlink *rtnl, int ifindex, return id; }

-uint32_t l_rtnl_set_powered(struct l_netlink rtnl, int ifindex, bool powered, +LIB_EXPORT uint32_t l_rtnl_set_powered(struct l_netlink rtnl, int ifindex, bool powered, l_netlink_command_func_t cb, void user_data, l_netlink_destroy_func_t destroy) { @@ -227,7 +228,7 @@ uint32_t l_rtnl_set_powered(struct l_netlink rtnl, int ifindex, bool powered, return id; }

-void l_rtnl_ifaddr4_extract(const struct ifaddrmsg ifa, int bytes, +LIB_EXPORT void l_rtnl_ifaddr4_extract(const struct ifaddrmsg ifa, int bytes, char label, char ip, char *broadcast) { struct in_addr in_addr; @@ -262,7 +263,7 @@ void l_rtnl_ifaddr4_extract(const struct ifaddrmsg ifa, int bytes, } }

-uint32_t l_rtnl_ifaddr4_dump(struct l_netlink rtnl, l_netlink_command_func_t cb, +LIB_EXPORT uint32_t l_rtnl_ifaddr4_dump(struct l_netlink rtnl, l_netlink_command_func_t cb, void user_data, l_netlink_destroy_func_t destroy) { @@ -283,7 +284,7 @@ uint32_t l_rtnl_ifaddr4_dump(struct l_netlink rtnl, l_netlink_command_func_t cb return id; }

-static uint32_t l_rtnl_ifaddr4_change(struct l_netlink rtnl, uint16_t nlmsg_type, +LIB_EXPORT static uint32_t l_rtnl_ifaddr4_change(struct l_netlink rtnl, uint16_t nlmsg_type, int ifindex, uint8_t prefix_len, const char ip, const char broadcast, l_netlink_command_func_t @@ -340,7 +341,7 @@ static uint32_t l_rtnl_ifaddr4_change(struct l_netlink *rtnl, uint16_t nlmsg_typ return id; }

-uint32_t l_rtnl_ifaddr4_add(struct l_netlink rtnl, int ifindex, +LIB_EXPORT uint32_t l_rtnl_ifaddr4_add(struct l_netlink rtnl, int ifindex, uint8_t prefix_len, const char ip, const char broadcast, l_netlink_command_func_t cb, void user_data, @@ -350,7 +351,7 @@ uint32_t l_rtnl_ifaddr4_add(struct l_netlink rtnl, int ifindex, broadcast, cb, user_data, destroy); }

-uint32_t l_rtnl_ifaddr4_delete(struct l_netlink rtnl, int ifindex, +LIB_EXPORT uint32_t l_rtnl_ifaddr4_delete(struct l_netlink rtnl, int ifindex, uint8_t prefix_len, const char ip, const char broadcast, l_netlink_command_func_t cb, void user_data, @@ -360,7 +361,7 @@ uint32_t l_rtnl_ifaddr4_delete(struct l_netlink rtnl, int ifindex, broadcast, cb, user_data, destroy); }

-void l_rtnl_route4_extract(const struct rtmsg rtmsg, uint32_t len, +LIB_EXPORT void l_rtnl_route4_extract(const struct rtmsg rtmsg, uint32_t len, uint32_t table, uint32_t ifindex, char dst, char gateway, char *src) { @@ -368,7 +369,7 @@ void l_rtnl_route4_extract(const struct rtmsg rtmsg, uint32_t len, NULL, NULL, dst, gateway, src); }

-uint32_t l_rtnl_route4_dump(struct l_netlink rtnl, +LIB_EXPORT uint32_t l_rtnl_route4_dump(struct l_netlink rtnl, l_netlink_command_func_t cb, void user_data, l_netlink_destroy_func_t destroy) { @@ -382,7 +383,7 @@ uint32_t l_rtnl_route4_dump(struct l_netlink rtnl, destroy); }

-static uint32_t l_rtnl_route4_add(struct l_netlink rtnl, int ifindex, +LIB_EXPORT static uint32_t l_rtnl_route4_add(struct l_netlink rtnl, int ifindex, uint8_t scope, uint8_t dst_len, const char dst, const char gateway, const char src, @@ -456,7 +457,7 @@ static uint32_t l_rtnl_route4_add(struct l_netlink rtnl, int ifindex, destroy); }

-uint32_t l_rtnl_route4_add_connected(struct l_netlink rtnl, int ifindex, +LIB_EXPORT uint32_t l_rtnl_route4_add_connected(struct l_netlink rtnl, int ifindex, uint8_t dst_len, const char dst, const char src, uint8_t proto, l_netlink_command_func_t cb, @@ -467,7 +468,7 @@ uint32_t l_rtnl_route4_add_connected(struct l_netlink *rtnl, int ifindex, src, 0, proto, cb, user_data, destroy); }

-uint32_t l_rtnl_route4_add_gateway(struct l_netlink rtnl, int ifindex, +LIB_EXPORT uint32_t l_rtnl_route4_add_gateway(struct l_netlink rtnl, int ifindex, const char gateway, const char src, uint32_t priority_offset, uint8_t proto, @@ -480,7 +481,7 @@ uint32_t l_rtnl_route4_add_gateway(struct l_netlink *rtnl, int ifindex, user_data, destroy); }

-void l_rtnl_ifaddr6_extract(const struct ifaddrmsg *ifa, int len, char *ip) +LIB_EXPORT void l_rtnl_ifaddr6_extract(const struct ifaddrmsg ifa, int len, char ip) { struct in6_addr in6_addr; struct rtattr attr; @@ -510,7 +511,7 @@ void l_rtnl_ifaddr6_extract(const struct ifaddrmsg ifa, int len, char ip) } }

-uint32_t l_rtnl_ifaddr6_dump(struct l_netlink rtnl, +LIB_EXPORT uint32_t l_rtnl_ifaddr6_dump(struct l_netlink rtnl, l_netlink_command_func_t cb, void user_data, l_netlink_destroy_func_t destroy) { @@ -531,7 +532,7 @@ uint32_t l_rtnl_ifaddr6_dump(struct l_netlink rtnl, return id; }

-static uint32_t l_rtnl_ifaddr6_change(struct l_netlink rtnl, +LIB_EXPORT static uint32_t l_rtnl_ifaddr6_change(struct l_netlink rtnl, uint16_t nlmsg_type, int ifindex, uint8_t prefix_len, const char ip, @@ -575,7 +576,7 @@ static uint32_t l_rtnl_ifaddr6_change(struct l_netlink rtnl, return id; }

-uint32_t l_rtnl_ifaddr6_add(struct l_netlink rtnl, int ifindex, +LIB_EXPORT uint32_t l_rtnl_ifaddr6_add(struct l_netlink rtnl, int ifindex, uint8_t prefix_len, const char ip, l_netlink_command_func_t cb, void user_data, l_netlink_destroy_func_t destroy) @@ -584,7 +585,7 @@ uint32_t l_rtnl_ifaddr6_add(struct l_netlink *rtnl, int ifindex, ip, cb, user_data, destroy); }

-uint32_t l_rtnl_ifaddr6_delete(struct l_netlink rtnl, int ifindex, +LIB_EXPORT uint32_t l_rtnl_ifaddr6_delete(struct l_netlink rtnl, int ifindex, uint8_t prefix_len, const char ip, l_netlink_command_func_t cb, void user_data, @@ -594,7 +595,7 @@ uint32_t l_rtnl_ifaddr6_delete(struct l_netlink *rtnl, int ifindex, ip, cb, user_data, destroy); }

-void l_rtnl_route6_extract(const struct rtmsg rtmsg, uint32_t len, +LIB_EXPORT void l_rtnl_route6_extract(const struct rtmsg rtmsg, uint32_t len, uint32_t table, uint32_t ifindex, char dst, char gateway, char *src) { @@ -602,7 +603,7 @@ void l_rtnl_route6_extract(const struct rtmsg rtmsg, uint32_t len, NULL, NULL, dst, gateway, src); }

-uint32_t l_rtnl_route6_dump(struct l_netlink rtnl, +LIB_EXPORT uint32_t l_rtnl_route6_dump(struct l_netlink rtnl, l_netlink_command_func_t cb, void user_data, l_netlink_destroy_func_t destroy) { @@ -616,7 +617,7 @@ uint32_t l_rtnl_route6_dump(struct l_netlink rtnl, destroy); }

-static uint32_t l_rtnl_route6_change(struct l_netlink rtnl, +LIB_EXPORT static uint32_t l_rtnl_route6_change(struct l_netlink rtnl, uint16_t nlmsg_type, int ifindex, const char gateway, uint32_t priority_offset, @@ -670,7 +671,7 @@ static uint32_t l_rtnl_route6_change(struct l_netlink rtnl, destroy); }

-uint32_t l_rtnl_route6_add_gateway(struct l_netlink rtnl, int ifindex, +LIB_EXPORT uint32_t l_rtnl_route6_add_gateway(struct l_netlink rtnl, int ifindex, const char gateway, uint32_t priority_offset, uint8_t proto, @@ -683,7 +684,7 @@ uint32_t l_rtnl_route6_add_gateway(struct l_netlink rtnl, int ifindex, user_data, destroy); }

-uint32_t l_rtnl_route6_delete_gateway(struct l_netlink rtnl, int ifindex, +LIB_EXPORT uint32_t l_rtnl_route6_delete_gateway(struct l_netlink rtnl, int ifindex, const char *gateway, uint32_t priority_offset, uint8_t proto,

dylanaraps commented 4 years ago

Might want to send this upstream as internal ell works fine and this sounds like an issue in regular iwd? Regardless, try the latest release I just pushed.