git: bpf: add XOR and modulo instructions

Aaron LI aly at crater.dragonflybsd.org
Mon Oct 5 04:08:19 PDT 2026


commit 33df790358286c465d0fc6c8bbf9887955e4683e
Author: David Bidner <david at crap.solutions>
Date:   Sat Oct 3 13:50:58 2026 +0200

    bpf: add XOR and modulo instructions
    
    libpcap can generate XOR and modulo instructions, but the kernel
    interpreter and validator do not support them.
    
    Add constant and register operands for both operations. Reject constant
    modulo by zero and return zero for a register zero divisor, as for DIV.
    Update the manual to match.
    
    Patch-by: guy
    Bug: https://bugs.dragonflybsd.org/issues/3387

Summary of changes:
 share/man/man4/bpf.4 | 10 +++++++++-
 sys/net/bpf_filter.c | 24 +++++++++++++++++++++++-
 2 files changed, 32 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/33df790358286c465d0fc6c8bbf9887955e4683e


-- 
DragonFly BSD source repository


More information about the Commits mailing list