aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2007-03-29 12:34:13 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-06 03:43:14 -0700
commit88a214c46c49d1bd82716c370f3c289f2ca2324e (patch)
tree263e3e001a70c12267533623141f9506231fb30a /include
parentbf3e77ef911c791ad77a137c76194d341ed364c3 (diff)
NET: Fix FIB rules compatability
[NET]: Fix fib_rules compatibility breakage Based upon a patch from Patrick McHardy. The fib_rules netlink attribute policy introduced in 2.6.19 broke userspace compatibilty. When specifying a rule with "from all" or "to all", iproute adds a zero byte long netlink attribute, but the policy requires all addresses to have a size equal to sizeof(struct in_addr)/sizeof(struct in6_addr), resulting in a validation error. Check attribute length of FRA_SRC/FRA_DST in the generic framework by letting the family specific rules implementation provide the length of an address. Report an error if address length is non zero but no address attribute is provided. Fix actual bug by checking address length for non-zero instead of relying on availability of attribute. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/net/fib_rules.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
index bc3c26494c3..d585ea9fa97 100644
--- a/include/net/fib_rules.h
+++ b/include/net/fib_rules.h
@@ -34,6 +34,7 @@ struct fib_rules_ops
int family;
struct list_head list;
int rule_size;
+ int addr_size;
int (*action)(struct fib_rule *,
struct flowi *, int,