mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-26 14:10:40 +00:00
Fix warnings on nedge
This commit is contained in:
parent
4b41152001
commit
2fe8e3fbaf
1 changed files with 9 additions and 3 deletions
12
src/Flow.cpp
12
src/Flow.cpp
|
|
@ -3074,8 +3074,8 @@ bool Flow::equal(const Mac* _src_pkt_mac, const Mac* _dst_pkt_mac,
|
|||
u_int8_t _protocol, const ICMPinfo* const _icmp_info,
|
||||
bool* src2srv_direction) const {
|
||||
const IpAddress *cli_ip = get_cli_ip_addr(), *srv_ip = get_srv_ip_addr();
|
||||
const Mac *src_mac, *dst_mac;
|
||||
#ifndef HAVE_NEDGE
|
||||
const Mac *src_mac, *dst_mac;
|
||||
/*
|
||||
nEdge note: As with Netfilter we do not have MAC visibility (at least
|
||||
on the first packet) they should not be used here to avoid invalid flow
|
||||
|
|
@ -3117,11 +3117,17 @@ bool Flow::equal(const Mac* _src_pkt_mac, const Mac* _dst_pkt_mac,
|
|||
|
||||
if (cli_ip && cli_ip->equal(_cli_ip) && srv_ip && srv_ip->equal(_srv_ip) &&
|
||||
_cli_port == cli_port && _srv_port == srv_port) {
|
||||
*src2srv_direction = true, src_mac = _src_pkt_mac, dst_mac = _dst_pkt_mac;
|
||||
*src2srv_direction = true;
|
||||
#ifndef HAVE_NEDGE
|
||||
src_mac = _src_pkt_mac, dst_mac = _dst_pkt_mac;
|
||||
#endif
|
||||
} else if (srv_ip && srv_ip->equal(_cli_ip) && cli_ip &&
|
||||
cli_ip->equal(_srv_ip) && _srv_port == cli_port &&
|
||||
_cli_port == srv_port) {
|
||||
*src2srv_direction = false, src_mac = _dst_pkt_mac, dst_mac = _src_pkt_mac;
|
||||
*src2srv_direction = false;
|
||||
#ifndef HAVE_NEDGE
|
||||
src_mac = _dst_pkt_mac, dst_mac = _src_pkt_mac;
|
||||
#endif
|
||||
cli_ip = get_srv_ip_addr(), srv_ip = get_cli_ip_addr();
|
||||
} else
|
||||
return (false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue