Hi Amir hash_pkt is called per-packet, we want to a void a printk per packet to avoid flooding dmesg and slowing doen packet processing, if ip_version comes from user input, sanity check should happen in userspace in my opinion.
Regards Alfredo > On 1 Jun 2017, at 07:38, Amir Kaduri <[email protected]> wrote: > > Hi Alfredo, > > This is the exact location of the function: > https://github.com/ntop/PF_RING/blob/dev/kernel/pf_ring.c#L1794 > > Thanks, > Amir > > On Mon, May 29, 2017 at 7:28 PM, Alfredo Cardigliano > <[email protected]> wrote: >> Hi Amir >> what is the file location you are talking about? >> >> Alfredo >> >>> On 29 May 2017, at 18:23, Amir Kaduri <[email protected]> wrote: >>> >>> In function hash_pkt(), there is a if-else-if statement based on >>> ip_version. If ip_version is 0, the hash won't include the ipaddress. >>> Since the ip_version might come from the user input, I suggest adding >>> an "else" and issue a warning in case ip_version wasn't set. >>> _______________________________________________ >>> Ntop-misc mailing list >>> [email protected] >>> http://listgateway.unipi.it/mailman/listinfo/ntop-misc >> >> >> _______________________________________________ >> Ntop-misc mailing list >> [email protected] >> http://listgateway.unipi.it/mailman/listinfo/ntop-misc > _______________________________________________ > Ntop-misc mailing list > [email protected] > http://listgateway.unipi.it/mailman/listinfo/ntop-misc
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ Ntop-misc mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop-misc
