opnsense-src/sys/netinet/libalias
Stefan Eßer 791035c8da libalias: fix divide by zero causing panic
The packet_limit can fall to 0, leading to a divide by zero abort in
the "packets % packet_limit".

An possible solution would be to apply a lower limit of 1 after the
calculation of packet_limit, but since any number modulo 1 gives 0,
the more efficient solution is to skip the modulo operation for
packet_limit <= 1.

Reported by:	Karl Denninger <karl@denninger.net>

(cherry picked from commit 58080fbca0)
2021-07-14 13:49:21 +02:00
..
alias.c libalias: Remove unused function LibAliasCheckNewLink 2021-06-07 07:48:07 +02:00
alias.h libalias: Remove unused function LibAliasCheckNewLink 2021-06-07 07:48:07 +02:00
alias_db.c libalias: fix divide by zero causing panic 2021-07-14 13:49:21 +02:00
alias_db.h libalias: Switch to SPLAY trees 2021-07-06 08:55:53 +02:00
alias_dummy.c libalias: Style cleanup 2021-05-29 15:08:02 +02:00
alias_ftp.c libalias: Style cleanup 2021-05-29 15:08:02 +02:00
alias_irc.c libalias: Style cleanup 2021-05-29 15:08:02 +02:00
alias_local.h libalias: Switch to SPLAY trees 2021-07-06 08:55:53 +02:00
alias_mod.c libalias: Style cleanup 2021-05-29 15:08:02 +02:00
alias_mod.h malloc: try to use builtins for zeroing at the callsite 2018-06-02 22:20:09 +00:00
alias_nbt.c libalias: Style cleanup 2021-05-29 15:08:02 +02:00
alias_pptp.c libalias: Style cleanup 2021-05-29 15:08:02 +02:00
alias_proxy.c libalias: Style cleanup 2021-05-29 15:08:02 +02:00
alias_sctp.c libalias: Promote per instance global variable timeStamp 2021-07-06 08:55:53 +02:00
alias_sctp.h libalias: Style cleanup 2021-05-29 15:08:02 +02:00
alias_skinny.c libalias: Style cleanup 2021-05-29 15:08:02 +02:00
alias_smedia.c libalias: Style cleanup 2021-05-29 15:08:02 +02:00
alias_util.c libalias: Style cleanup 2021-05-29 15:08:02 +02:00
HISTORY libalias: Switch to SPLAY trees 2021-07-06 08:55:53 +02:00
libalias.3 libalias: Remove unused function LibAliasCheckNewLink 2021-06-07 07:48:07 +02:00