diff --git a/src/source-pcap.c b/src/source-pcap.c index 7a31f580aa..0413709216 100644 --- a/src/source-pcap.c +++ b/src/source-pcap.c @@ -415,7 +415,7 @@ TmEcode ReceivePcapThreadInit(ThreadVars *tv, void *initdata, void **data) { if (pcapconfig->snaplen == 0) { /* We set snaplen if we can get the MTU */ - ptv->pcap_snaplen = GetIfaceMaxPayloadSize(pcapconfig->iface); + ptv->pcap_snaplen = GetIfaceMaxPacketSize(pcapconfig->iface); } else { ptv->pcap_snaplen = pcapconfig->snaplen; } @@ -562,7 +562,7 @@ TmEcode ReceivePcapThreadInit(ThreadVars *tv, void *initdata, void **data) { if (pcapconfig->snaplen == 0) { /* We try to set snaplen from MTU value */ - ptv->pcap_snaplen = GetIfaceMaxPayloadSize(pcapconfig->iface); + ptv->pcap_snaplen = GetIfaceMaxPacketSize(pcapconfig->iface); /* be conservative with old pcap lib to mimic old tcpdump behavior when MTU was not available. */ if (ptv->pcap_snaplen <= 0) diff --git a/src/suricata.c b/src/suricata.c index 9f5f12507d..568ec6a64d 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -1426,7 +1426,7 @@ int main(int argc, char **argv) case RUNMODE_PFRING: /* FIXME this don't work effficiently in multiinterface */ /* find payload for interface and use it */ - default_packet_size = GetIfaceMaxPayloadSize(pcap_dev); + default_packet_size = GetIfaceMaxPacketSize(pcap_dev); if (default_packet_size) break; default: diff --git a/src/util-ioctl.c b/src/util-ioctl.c index 7c681ecb82..ef5824a3b5 100644 --- a/src/util-ioctl.c +++ b/src/util-ioctl.c @@ -97,7 +97,7 @@ int GetIfaceMTU(char *pcap_dev) } /** - * \brief output max payload size for a link + * \brief output max packet size for a link * * This does a best effort to find the maximum packet size * for the link. In case of uncertainty, it will output a @@ -106,7 +106,7 @@ int GetIfaceMTU(char *pcap_dev) * \param Name of a network interface * \retval 0 in case of error */ -int GetIfaceMaxPayloadSize(char *pcap_dev) +int GetIfaceMaxPacketSize(char *pcap_dev) { int ll_header = GetIfaceMaxHWHeaderLength(pcap_dev); int mtu = GetIfaceMTU(pcap_dev); diff --git a/src/util-ioctl.h b/src/util-ioctl.h index 9292f3fe48..7378aeeef4 100644 --- a/src/util-ioctl.h +++ b/src/util-ioctl.h @@ -22,4 +22,4 @@ */ int GetIfaceMTU(char *pcap_dev); -int GetIfaceMaxPayloadSize(char *pcap_dev); +int GetIfaceMaxPacketSize(char *pcap_dev);