From d55a03ca0c5d2e1aa10f9a4c36e376d5ad275d6b Mon Sep 17 00:00:00 2001 From: Matias Fontanini Date: Sat, 25 Oct 2014 17:42:46 -0500 Subject: [PATCH] Added L3 packet receive exception on BSD. --- src/packet_sender.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/packet_sender.cpp b/src/packet_sender.cpp index f43f1bc..5a202e9 100644 --- a/src/packet_sender.cpp +++ b/src/packet_sender.cpp @@ -293,6 +293,9 @@ PDU *PacketSender::recv_l3(PDU &pdu, struct sockaddr* link_addr, uint32_t len_ad open_l3_socket(type); std::vector sockets(1, _sockets[type]); if(type == IP_TCP_SOCKET || type == IP_UDP_SOCKET) { + #ifdef BSD + throw std::runtime_error("Receiving L3 packets not supported on this platform"); + #endif open_l3_socket(ICMP_SOCKET); sockets.push_back(_sockets[ICMP_SOCKET]); }