Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34414
b: refs/heads/master
c: e1ef4bf
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Graf authored and David S. Miller committed Sep 22, 2006
1 parent 3907e3d commit 05ee1fd
Show file tree
Hide file tree
Showing 6 changed files with 250 additions and 378 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 101367c2f8c464ea96643192673aa18d88e6336d
refs/heads/master: e1ef4bf23b1ced0bf78a1c98289f746486e5c912
14 changes: 7 additions & 7 deletions trunk/include/net/ip_fib.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <net/flow.h>
#include <linux/seq_file.h>
#include <net/fib_rules.h>

/* WARNING: The ordering of these elements must match ordering
* of RTA_* rtnetlink attribute numbers.
Expand Down Expand Up @@ -203,9 +204,8 @@ static inline void fib_select_default(const struct flowi *flp, struct fib_result
#define ip_fib_main_table (fib_tables[RT_TABLE_MAIN])

extern struct fib_table * fib_tables[RT_TABLE_MAX+1];
extern int fib_lookup(const struct flowi *flp, struct fib_result *res);
extern int fib_lookup(struct flowi *flp, struct fib_result *res);
extern struct fib_table *__fib_new_table(int id);
extern void fib_rule_put(struct fib_rule *r);

static inline struct fib_table *fib_get_table(int id)
{
Expand Down Expand Up @@ -251,15 +251,15 @@ extern u32 __fib_res_prefsrc(struct fib_result *res);
extern struct fib_table *fib_hash_init(int id);

#ifdef CONFIG_IP_MULTIPLE_TABLES
/* Exported by fib_rules.c */
extern int fib4_rules_dump(struct sk_buff *skb, struct netlink_callback *cb);

extern void __init fib4_rules_init(void);
extern void __exit fib4_rules_cleanup(void);

extern int inet_rtm_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
extern int inet_rtm_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
extern int inet_dump_rules(struct sk_buff *skb, struct netlink_callback *cb);
#ifdef CONFIG_NET_CLS_ROUTE
extern u32 fib_rules_tclass(struct fib_result *res);
#endif
extern void fib_rules_init(void);

#endif

static inline void fib_combine_itag(u32 *itag, struct fib_result *res)
Expand Down
1 change: 1 addition & 0 deletions trunk/net/ipv4/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ config IP_FIB_HASH
config IP_MULTIPLE_TABLES
bool "IP: policy routing"
depends on IP_ADVANCED_ROUTER
select FIB_RULES
---help---
Normally, a router decides what to do with a received packet based
solely on the packet's final destination address. If you say Y here,
Expand Down
4 changes: 1 addition & 3 deletions trunk/net/ipv4/devinet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,9 +1151,7 @@ static struct rtnetlink_link inet_rtnetlink_table[RTM_NR_MSGTYPES] = {
[RTM_GETROUTE - RTM_BASE] = { .doit = inet_rtm_getroute,
.dumpit = inet_dump_fib, },
#ifdef CONFIG_IP_MULTIPLE_TABLES
[RTM_NEWRULE - RTM_BASE] = { .doit = inet_rtm_newrule, },
[RTM_DELRULE - RTM_BASE] = { .doit = inet_rtm_delrule, },
[RTM_GETRULE - RTM_BASE] = { .dumpit = inet_dump_rules, },
[RTM_GETRULE - RTM_BASE] = { .dumpit = fib4_rules_dump, },
#endif
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/fib_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ void __init ip_fib_init(void)
ip_fib_local_table = fib_hash_init(RT_TABLE_LOCAL);
ip_fib_main_table = fib_hash_init(RT_TABLE_MAIN);
#else
fib_rules_init();
fib4_rules_init();
#endif

register_netdevice_notifier(&fib_netdev_notifier);
Expand Down
Loading

0 comments on commit 05ee1fd

Please sign in to comment.