Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "pppoes" filter for links with variable-length prefix to link header #835

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Aug 14, 2019

  1. compiler_state: redefine off_outermostlinkhdr as pointer to off_*linkhdr

    off_outermostlinkhdr doesn't work as expected when
    "off_outermostlinkhdr.is_variable" (e.g. IEEE_802_11_* links) since
    registers are allocated only for off_linkhdr (off_outermostlinkhdr.reg
    will always be -1)
    
    Fix this by redefinig off_outermostlinkhdr as pointer to offset of the
    outermost link header in the link header stack (i.e. either off_linkhdr
    or off_prevlinkhdr.)
    aliemjay committed Aug 14, 2019
    Configuration menu
    Copy the full SHA
    d605210 View commit details
    Browse the repository at this point in the history
  2. fix "pppoes" filter for IEE_802_11* link types!

    Store prefix lengths generated by gen_load_*_llprefixlen() in the
    register of off_outermostlinkhdr instead of off_linkhdr.
    
    This should fixes a bug for when stacking link headers (as is
    the case with "pppoes" filter), offset values are stored in
    off_linkhdr.reg instead of off_prevlinkhdr.reg.
    
    gen_load_802_11_header_len should also generate code depending on
    outermostlinktype instead of linktype.
    aliemjay committed Aug 14, 2019
    Configuration menu
    Copy the full SHA
    0477aa8 View commit details
    Browse the repository at this point in the history