Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: the-tcpdump-group/tcpdump
base: e02fba98c8e9
Choose a base ref
...
head repository: the-tcpdump-group/tcpdump
compare: 52c7b59aef81
Choose a head ref
  • 6 commits
  • 5 files changed
  • 1 contributor

Commits on Dec 18, 2014

  1. Check whether the version field is available before looking at it.

    While we're at it, use ND_TCHECK(), rather than a hand-rolled check, to
    check whether we have the full fixed-length portion of the IPv4 header.
    guyharris committed Dec 18, 2014
    Copy the full SHA
    45f8b5e View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    df8c15f View commit details
    Browse the repository at this point in the history
  3. Fix length checking.

    Check both the captured length and the on-the-wire length (the latter
    *should* be greater than or equal to the former, but that's not
    guaranteed).
    
    Add some additional length checks, so neither caplen nor length
    underflow.
    
    If we stop dissecting because the packet is too short, return 1, not 0,
    as we've "dissected" what we can; 0 means "this is LLC+SNAP with an OUI
    of 0 and an unknown Ethertype".
    guyharris committed Dec 18, 2014
    Copy the full SHA
    44128cf View commit details
    Browse the repository at this point in the history
  4. Clean up length checks.

    Check only the amount of length that matters at any given point; yes,
    this means we do multiple checks, but so it goes.
    
    We don't need to check for LLC+SNAP - llc_print() does that for us.  We
    do, however, need to check to make sure we can safely skip the Fore
    header.
    guyharris committed Dec 18, 2014
    Copy the full SHA
    6371416 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2014

  1. Copy the full SHA
    a0d5251 View commit details
    Browse the repository at this point in the history
  2. Don't dissect a header with a version field != 4.

    Also, clean up the message printed when it's 6.
    guyharris committed Dec 19, 2014
    Copy the full SHA
    52c7b59 View commit details
    Browse the repository at this point in the history