aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-08-11 02:09:48 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 17:54:25 -0400
commit9e762a4a89b302cb3b26a1f9bb33eff459eaeca9 (patch)
tree4be606cc6bfe097beac3aeeea32b4adc107409b7 /net/core
parent2dfe55b47e3d66ded5a84caf71e0da5710edf48b (diff)
[NET]: Introduce RTA_TABLE/FRA_TABLE attributes
Introduce RTA_TABLE route attribute and FRA_TABLE routing rule attribute to hold 32 bit routing table IDs. Usespace compatibility is provided by continuing to accept and send the rtm_table field, but because of its limited size it can only carry the low 8 bits of the table ID. This implies that if larger IDs are used, _all_ userspace programs using them need to use RTA_TABLE. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/fib_rules.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 6cdad24038e2..873b04d5df81 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -187,7 +187,7 @@ int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
187 187
188 rule->action = frh->action; 188 rule->action = frh->action;
189 rule->flags = frh->flags; 189 rule->flags = frh->flags;
190 rule->table = frh->table; 190 rule->table = frh_get_table(frh, tb);
191 191
192 if (!rule->pref && ops->default_pref) 192 if (!rule->pref && ops->default_pref)
193 rule->pref = ops->default_pref(); 193 rule->pref = ops->default_pref();
@@ -245,7 +245,7 @@ int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
245 if (frh->action && (frh->action != rule->action)) 245 if (frh->action && (frh->action != rule->action))
246 continue; 246 continue;
247 247
248 if (frh->table && (frh->table != rule->table)) 248 if (frh->table && (frh_get_table(frh, tb) != rule->table))
249 continue; 249 continue;
250 250
251 if (tb[FRA_PRIORITY] && 251 if (tb[FRA_PRIORITY] &&
@@ -291,6 +291,7 @@ static int fib_nl_fill_rule(struct sk_buff *skb, struct fib_rule *rule,
291 291
292 frh = nlmsg_data(nlh); 292 frh = nlmsg_data(nlh);
293 frh->table = rule->table; 293 frh->table = rule->table;
294 NLA_PUT_U32(skb, FRA_TABLE, rule->table);
294 frh->res1 = 0; 295 frh->res1 = 0;
295 frh->res2 = 0; 296 frh->res2 = 0;
296 frh->action = rule->action; 297 frh->action = rule->action;