mirror of
https://github.com/nfstream/nfstream.git
synced 2026-05-19 07:54:25 +00:00
minor fixes
This commit is contained in:
parent
464cf8b5d3
commit
66b577abda
6 changed files with 15 additions and 10 deletions
2
.github/workflows/build_wheel_publish.yml
vendored
2
.github/workflows/build_wheel_publish.yml
vendored
|
|
@ -51,7 +51,7 @@ jobs:
|
|||
CIBW_ARCHS_MACOS: x86_64 arm64
|
||||
|
||||
- name: Upload generated wheel
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: generated_wheels
|
||||
path: ./wheelhouse/*.whl
|
||||
|
|
|
|||
2
.github/workflows/cifuzz.yml
vendored
2
.github/workflows/cifuzz.yml
vendored
|
|
@ -19,7 +19,7 @@ jobs:
|
|||
dry-run: false
|
||||
language: python
|
||||
- name: Upload Crash
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure() && steps.build.outcome == 'success'
|
||||
with:
|
||||
name: artifacts
|
||||
|
|
|
|||
|
|
@ -21,4 +21,4 @@ from .plugin import NFPlugin
|
|||
# streamer module is the core module of nfstream package.
|
||||
__author__ = """Zied Aouini"""
|
||||
__email__ = "aouinizied@gmail.com"
|
||||
__version__ = "6.5.4"
|
||||
__version__ = "6.5.5"
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ static void packet_get_tcp_info(const uint8_t *l4, uint16_t l4_packet_len, struc
|
|||
tcp_len = ndpi_min(4*(*tcph)->doff, l4_packet_len);
|
||||
*payload = (uint8_t*)&l4[tcp_len];
|
||||
*payload_len = ndpi_max(0, l4_packet_len-4*(*tcph)->doff);
|
||||
*l4_data_len = l4_packet_len - sizeof(struct ndpi_tcphdr);
|
||||
*l4_data_len = l4_packet_len;
|
||||
nf_pkt->fin = (*tcph)->fin;
|
||||
nf_pkt->syn = (*tcph)->syn;
|
||||
nf_pkt->rst = (*tcph)->rst;
|
||||
|
|
@ -232,7 +232,7 @@ static void packet_get_udp_info(const uint8_t *l4, uint16_t l4_packet_len, struc
|
|||
*sport = (*udph)->source, *dport = (*udph)->dest;
|
||||
*payload = (uint8_t*)&l4[sizeof(struct ndpi_udphdr)];
|
||||
*payload_len = (l4_packet_len > sizeof(struct ndpi_udphdr)) ? l4_packet_len-sizeof(struct ndpi_udphdr) : 0;
|
||||
*l4_data_len = l4_packet_len - sizeof(struct ndpi_udphdr);
|
||||
*l4_data_len = l4_packet_len;
|
||||
nf_pkt->fin = nf_pkt->syn = nf_pkt->rst = nf_pkt->psh = nf_pkt->ack = nf_pkt->urg = nf_pkt->ece = nf_pkt->cwr = 0;
|
||||
}
|
||||
|
||||
|
|
@ -243,7 +243,7 @@ static void packet_get_icmp_info(const uint8_t *l4, uint16_t l4_packet_len, stru
|
|||
uint16_t *dport, uint32_t *l4_data_len, uint8_t **payload, uint16_t *payload_len) {
|
||||
*payload = (uint8_t*)&l4[sizeof(struct ndpi_icmphdr )];
|
||||
*payload_len = (l4_packet_len > sizeof(struct ndpi_icmphdr)) ? l4_packet_len-sizeof(struct ndpi_icmphdr) : 0;
|
||||
*l4_data_len = l4_packet_len - sizeof(struct ndpi_icmphdr);
|
||||
*l4_data_len = l4_packet_len;
|
||||
*sport = *dport = 0;
|
||||
nf_pkt->fin = nf_pkt->syn = nf_pkt->rst = nf_pkt->psh = nf_pkt->ack = nf_pkt->urg = nf_pkt->ece = nf_pkt->cwr = 0;
|
||||
}
|
||||
|
|
@ -255,7 +255,7 @@ static void packet_get_icmp6_info(const uint8_t *l4, uint16_t l4_packet_len, str
|
|||
uint16_t *dport, uint32_t *l4_data_len, uint8_t **payload, uint16_t *payload_len) {
|
||||
*payload = (uint8_t*)&l4[sizeof(struct ndpi_icmp6hdr)];
|
||||
*payload_len = (l4_packet_len > sizeof(struct ndpi_icmp6hdr)) ? l4_packet_len-sizeof(struct ndpi_icmp6hdr) : 0;
|
||||
*l4_data_len = l4_packet_len - sizeof(struct ndpi_icmp6hdr);
|
||||
*l4_data_len = l4_packet_len;
|
||||
*sport = *dport = 0;
|
||||
nf_pkt->fin = nf_pkt->syn = nf_pkt->rst = nf_pkt->psh = nf_pkt->ack = nf_pkt->urg = nf_pkt->ece = nf_pkt->cwr = 0;
|
||||
}
|
||||
|
|
@ -604,6 +604,11 @@ static int packet_datalink_checker(uint32_t caplen, const uint8_t *packet, uint1
|
|||
break;
|
||||
case DLT_RAW:
|
||||
(*ip_offset) = eth_offset;
|
||||
if (caplen > eth_offset) { // Raw IP (DLT_RAW) can carry either IPv4 or IPv6 packets, so let's check it
|
||||
uint8_t ip_version = packet[eth_offset] >> 4;
|
||||
if (ip_version == 4) *type = ETH_P_IP;
|
||||
if (ip_version == 6) *type = ETH_P_IPV6;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
|
|
@ -1741,7 +1746,7 @@ void meter_free_flow(struct nf_flow *flow, uint8_t n_dissections, uint16_t splt,
|
|||
* engine_version: return engine library version.
|
||||
*/
|
||||
const char *engine_lib_version(void) {
|
||||
return "6.5.4";
|
||||
return "6.5.5";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
[bumpversion]
|
||||
current_version = 6.5.4
|
||||
current_version = 6.5.5
|
||||
commit = True
|
||||
tag = True
|
||||
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -32,7 +32,7 @@ INSTALL_REQUIRES = ["cffi>=1.15.0", "psutil>=5.8.0", "dpkt>=1.9.7", "numpy>=1.19
|
|||
|
||||
setup(
|
||||
name="nfstream",
|
||||
version="6.5.4",
|
||||
version="6.5.5",
|
||||
url="https://www.nfstream.org/",
|
||||
license="LGPLv3",
|
||||
description="A Flexible Network Data Analysis Framework",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue