diff options
author | Jan Maria Matejka <mq@ucw.cz> | 2017-12-13 10:29:10 +0100 |
---|---|---|
committer | Jan Maria Matejka <mq@ucw.cz> | 2017-12-13 10:29:10 +0100 |
commit | cb21c5ffa92494b1a4bf110605509de3326b6c3d (patch) | |
tree | bd1c37b57c1d1aa45efecf4868ddf7d3ff27c489 /sysdep/bsd/krt-sock.c | |
parent | 71c51aa4ab0daa3490f9a488f505eb25102c4705 (diff) | |
parent | 1e11918c8c56e3505193f4e6426c1a34aaae3941 (diff) |
Merge branch 'int-new' of gitlab.labs.nic.cz:labs/bird into int-new
Diffstat (limited to 'sysdep/bsd/krt-sock.c')
-rw-r--r-- | sysdep/bsd/krt-sock.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 604cd510..0a52cfbd 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -74,11 +74,11 @@ const int rt_default_ecmp = 0; /* Dynamic max number of tables */ -int krt_max_tables; +uint krt_max_tables; #ifdef KRT_USE_SYSCTL_NET_FIBS -static int +static uint krt_get_max_tables(void) { int fibs; @@ -90,7 +90,11 @@ krt_get_max_tables(void) return 1; } - return MIN(fibs, KRT_MAX_TABLES); + /* Should not happen */ + if (fibs < 1) + return 1; + + return (uint) MIN(fibs, KRT_MAX_TABLES); } #else |