Merge pull request #866 from majestrate/fix-issue-865

Fix issue 865
pull/869/head^2
Jeff 5 years ago committed by GitHub
commit 13018f72bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -465,8 +465,10 @@ namespace llarp
ILinkLayer* link = static_cast< ILinkLayer* >(udp->user);
auto pkts = std::make_shared< llarp_pkt_list >();
llarp_ev_udp_recvmany(&link->m_udp, pkts.get());
link->logic()->queue_func([pkts, link]() {
auto logic = link->logic();
if(logic == nullptr)
return;
logic->queue_func([pkts, link]() {
auto itr = pkts->begin();
while(itr != pkts->end())
{

@ -15,15 +15,17 @@
// (which tuntap.h includes) impossible. When we stop supporting xenial we can
// remove this mess and just include net/if.h here.
#if defined(Linux) && __GLIBC__ == 2 && __GLIBC_MINOR__ == 23
# include <linux/version.h>
# if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0) && LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)
# define _NET_IF_H 1
# include <linux/if.h>
extern "C" unsigned int if_nametoindex (const char *__ifname) __THROW;
# endif
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0) \
&& LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
#define _NET_IF_H 1
#include <linux/if.h>
extern "C" unsigned int
if_nametoindex(const char* __ifname) __THROW;
#endif
#else
# include <net/if.h>
#endif
#include <net/if.h>
#endif
#endif
#include <net/net_addr.hpp>

Loading…
Cancel
Save