Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41603
b: refs/heads/master
c: 1f6c955
h: refs/heads/master
i:
  41601: a764993
  41599: 6da8a00
v: v3
  • Loading branch information
Thomas Graf authored and David S. Miller committed Dec 3, 2006
1 parent 9c14d53 commit 06a03a1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 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: b8964ed9fa727109c9084abc807652ebfb681c18
refs/heads/master: 1f6c9557e8206757c91b5737bb8dbd5b1ae3a773
7 changes: 7 additions & 0 deletions trunk/include/net/fib_rules.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ struct fib_rules_ops
struct module *owner;
};

#define FRA_GENERIC_POLICY \
[FRA_IFNAME] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, \
[FRA_PRIORITY] = { .type = NLA_U32 }, \
[FRA_FWMARK] = { .type = NLA_U32 }, \
[FRA_FWMASK] = { .type = NLA_U32 }, \
[FRA_TABLE] = { .type = NLA_U32 }

static inline void fib_rule_get(struct fib_rule *rule)
{
atomic_inc(&rule->refcnt);
Expand Down
6 changes: 1 addition & 5 deletions trunk/net/decnet/dn_rules.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,9 @@ static int dn_fib_rule_action(struct fib_rule *rule, struct flowi *flp,
}

static struct nla_policy dn_fib_rule_policy[FRA_MAX+1] __read_mostly = {
[FRA_IFNAME] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 },
[FRA_PRIORITY] = { .type = NLA_U32 },
FRA_GENERIC_POLICY,
[FRA_SRC] = { .type = NLA_U16 },
[FRA_DST] = { .type = NLA_U16 },
[FRA_FWMARK] = { .type = NLA_U32 },
[FRA_FWMASK] = { .type = NLA_U32 },
[FRA_TABLE] = { .type = NLA_U32 },
};

static int dn_fib_rule_match(struct fib_rule *rule, struct flowi *fl, int flags)
Expand Down
6 changes: 1 addition & 5 deletions trunk/net/ipv4/fib_rules.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,10 @@ static struct fib_table *fib_empty_table(void)
}

static struct nla_policy fib4_rule_policy[FRA_MAX+1] __read_mostly = {
[FRA_IFNAME] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 },
[FRA_PRIORITY] = { .type = NLA_U32 },
FRA_GENERIC_POLICY,
[FRA_SRC] = { .type = NLA_U32 },
[FRA_DST] = { .type = NLA_U32 },
[FRA_FWMARK] = { .type = NLA_U32 },
[FRA_FWMASK] = { .type = NLA_U32 },
[FRA_FLOW] = { .type = NLA_U32 },
[FRA_TABLE] = { .type = NLA_U32 },
};

static int fib4_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
Expand Down
6 changes: 1 addition & 5 deletions trunk/net/ipv6/fib6_rules.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,9 @@ static int fib6_rule_match(struct fib_rule *rule, struct flowi *fl, int flags)
}

static struct nla_policy fib6_rule_policy[FRA_MAX+1] __read_mostly = {
[FRA_IFNAME] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 },
[FRA_PRIORITY] = { .type = NLA_U32 },
FRA_GENERIC_POLICY,
[FRA_SRC] = { .len = sizeof(struct in6_addr) },
[FRA_DST] = { .len = sizeof(struct in6_addr) },
[FRA_FWMARK] = { .type = NLA_U32 },
[FRA_FWMASK] = { .type = NLA_U32 },
[FRA_TABLE] = { .type = NLA_U32 },
};

static int fib6_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
Expand Down

0 comments on commit 06a03a1

Please sign in to comment.