diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/inet/ip/ip_ftable.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr/src/uts/common/inet/ip/ip_ftable.c b/usr/src/uts/common/inet/ip/ip_ftable.c index 7cb83a2a76..980436b578 100644 --- a/usr/src/uts/common/inet/ip/ip_ftable.c +++ b/usr/src/uts/common/inet/ip/ip_ftable.c @@ -815,6 +815,11 @@ ire_round_robin(irb_t *irb_ptr, ire_ftable_args_t *margs, uint_t hash, rw_enter(&irb_ptr->irb_lock, RW_WRITER); maxwalk = irb_ptr->irb_ire_cnt; /* Excludes condemned */ + if (maxwalk == 0) { + rw_exit(&irb_ptr->irb_lock); + return (NULL); + } + hash %= maxwalk; irb_refhold_locked(irb_ptr); rw_exit(&irb_ptr->irb_lock); |