#include <net/sock.h>
#include <net/ip_fib.h>
+#include "fib_lookup.h"
+
static kmem_cache_t *fn_hash_kmem;
static kmem_cache_t *fn_alias_kmem;
u32 fn_key;
};
-struct fib_alias {
- struct list_head fa_list;
- struct fib_info *fa_info;
- u8 fa_tos;
- u8 fa_type;
- u8 fa_scope;
- u8 fa_state;
-};
-
-#define FN_S_ACCESSED 1
-
struct fn_zone {
struct fn_zone *fz_next; /* Next not empty zone */
struct hlist_head *fz_hash; /* Hash table pointer */
if (fa->fa_scope < flp->fl4_scope)
continue;
- fa->fa_state |= FN_S_ACCESSED;
+ fa->fa_state |= FA_S_ACCESSED;
err = fib_semantic_match(fa->fa_type,
fa->fa_info,
if (!next_fi->fib_nh[0].nh_gw ||
next_fi->fib_nh[0].nh_scope != RT_SCOPE_LINK)
continue;
- fa->fa_state |= FN_S_ACCESSED;
+ fa->fa_state |= FA_S_ACCESSED;
if (fi == NULL) {
if (next_fi != res->fi)
fa->fa_type = type;
fa->fa_scope = r->rtm_scope;
state = fa->fa_state;
- fa->fa_state &= ~FN_S_ACCESSED;
+ fa->fa_state &= ~FA_S_ACCESSED;
write_unlock_bh(&fib_hash_lock);
fib_release_info(fi_drop);
- if (state & FN_S_ACCESSED)
+ if (state & FA_S_ACCESSED)
rt_cache_flush(-1);
return 0;
}
}
write_unlock_bh(&fib_hash_lock);
- if (fa->fa_state & FN_S_ACCESSED)
+ if (fa->fa_state & FA_S_ACCESSED)
rt_cache_flush(-1);
fn_free_alias(fa);
if (kill_fn) {
--- /dev/null
+#ifndef _FIB_LOOKUP_H
+#define _FIB_LOOKUP_H
+
+#include <linux/types.h>
+#include <linux/list.h>
+#include <net/ip_fib.h>
+
+struct fib_alias {
+ struct list_head fa_list;
+ struct fib_info *fa_info;
+ u8 fa_tos;
+ u8 fa_type;
+ u8 fa_scope;
+ u8 fa_state;
+};
+
+#define FA_S_ACCESSED 0x01
+
+#endif /* _FIB_LOOKUP_H */