Fix numbering of routing tables in IPv6 version.

This commit is contained in:
Martin Mares 2000-06-18 19:49:32 +00:00
parent 4daf03e513
commit ca00d4a13a
2 changed files with 5 additions and 4 deletions

View file

@ -15,11 +15,7 @@
* to krt-set.h, krt-iface.h and this file. * to krt-set.h, krt-iface.h and this file.
*/ */
#ifdef IPV6
#define NL_NUM_TABLES 1
#else
#define NL_NUM_TABLES 256 #define NL_NUM_TABLES 256
#endif
struct krt_scan_params { struct krt_scan_params {
int table_id; /* Kernel table ID we sync with */ int table_id; /* Kernel table ID we sync with */

View file

@ -18,8 +18,13 @@ CF_ADDTO(kern_proto, kern_proto nl_item ';')
nl_item: nl_item:
KERNEL TABLE expr { KERNEL TABLE expr {
#ifndef IPV6
if ($3 <= 0 || $3 >= NL_NUM_TABLES) if ($3 <= 0 || $3 >= NL_NUM_TABLES)
cf_error("Kernel routing table number out of range"); cf_error("Kernel routing table number out of range");
#else
if ($3 != 254)
cf_error("Linux implementation of IPv6 doesn't support multiple routing tables");
#endif
THIS_KRT->scan.table_id = $3; THIS_KRT->scan.table_id = $3;
} }
; ;