• Paul Warren's avatar
    Fix handling of packets that are too short to be valid - Frédéric Perrin <fperrin@brocade.com> · 3fae1acf
    Paul Warren authored
    When packets that are too short to be valid IP packets happen to start
    with 0x45 or 0x60, iftop will still try to read source and destination
    addresses, which will usually just be random garbage.
    
    Note the assumption about what libpcap guarantees in the comments to
    handle_ip_packet():
    
        * It is assumed that the snaplen (currently hard-coded to 1000) is
        * big enough to always capture the IP header past the L2 encap, and
        * that pcap never truncates the packet to less than snaplen; in
        * other words, that pcaphdr->caplen = MIN(pcaphdr->len, snaplen).
    3fae1acf
Name
Last commit
Last update
config Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
TODO Loading commit data...
addr_hash.c Loading commit data...
addr_hash.h Loading commit data...
addrs_dlpi.c Loading commit data...
addrs_ioctl.c Loading commit data...
addrs_ioctl.h Loading commit data...
bootstrap Loading commit data...
cfgfile.c Loading commit data...
cfgfile.h Loading commit data...
configure.ac Loading commit data...
counter_hash.c Loading commit data...
counter_hash.h Loading commit data...
dlcommon.c Loading commit data...
dlcommon.h Loading commit data...
edline.c Loading commit data...
ether.h Loading commit data...
ethertype.h Loading commit data...
extract.h Loading commit data...
hash.c Loading commit data...
hash.h Loading commit data...
iftop-dump.c Loading commit data...
iftop.8 Loading commit data...
iftop.c Loading commit data...
iftop.h Loading commit data...
iftop.spec.in Loading commit data...
integers.h Loading commit data...
ip.h Loading commit data...
llc.h Loading commit data...
ns_hash.c Loading commit data...
ns_hash.h Loading commit data...
options.c Loading commit data...
options.h Loading commit data...
ppp.h Loading commit data...
resolver.c Loading commit data...
resolver.h Loading commit data...
screenfilter.c Loading commit data...
screenfilter.h Loading commit data...
serv_hash.c Loading commit data...
serv_hash.h Loading commit data...
sll.h Loading commit data...
sorted_list.c Loading commit data...
sorted_list.h Loading commit data...
stringmap.c Loading commit data...
stringmap.h Loading commit data...
tcp.h Loading commit data...
threadprof.c Loading commit data...
threadprof.h Loading commit data...
token.h Loading commit data...
tui.c Loading commit data...
tui.h Loading commit data...
ui.c Loading commit data...
ui.h Loading commit data...
ui_common.c Loading commit data...
ui_common.h Loading commit data...
util.c Loading commit data...
vector.c Loading commit data...
vector.h Loading commit data...