forked from acouzens/open5gs
fix boot-looping of UPF with interface in TAP mode
This commit is contained in:
parent
d1f3ce304d
commit
26141ee2b5
|
@ -21,6 +21,7 @@
|
||||||
#include <tins/ethernetII.h>
|
#include <tins/ethernetII.h>
|
||||||
#include <tins/hw_address.h>
|
#include <tins/hw_address.h>
|
||||||
#include <tins/icmpv6.h>
|
#include <tins/icmpv6.h>
|
||||||
|
#include <tins/exceptions.h>
|
||||||
|
|
||||||
#include "arp-nd.h"
|
#include "arp-nd.h"
|
||||||
|
|
||||||
|
@ -69,8 +70,14 @@ uint8_t arp_reply(uint8_t *reply_data, uint8_t *request_data, uint len,
|
||||||
bool _parse_nd(EthernetII &pdu)
|
bool _parse_nd(EthernetII &pdu)
|
||||||
{
|
{
|
||||||
if (pdu.payload_type() == ETHERTYPE_IPV6) {
|
if (pdu.payload_type() == ETHERTYPE_IPV6) {
|
||||||
const ICMPv6& icmp6 = pdu.rfind_pdu<ICMPv6>();
|
try {
|
||||||
return icmp6.type() == ICMPv6::NEIGHBOUR_SOLICIT;
|
const ICMPv6& icmp6 = pdu.rfind_pdu<ICMPv6>();
|
||||||
|
return icmp6.type() == ICMPv6::NEIGHBOUR_SOLICIT;
|
||||||
|
}
|
||||||
|
catch (Tins::pdu_not_found& e) {
|
||||||
|
/* If it is not an ICMPv6 message, it can not be a NEIGHBOUR_SOLICIT */
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue