net: fib_rules: decouple address families from real address families
Decouple the address family values used for fib_rules from the real address families in socket.h. This allows to use fib_rules for code that is not a real address family without increasing AF_MAX/NPROTO. Values up to 127 are reserved for real address families and map directly to the corresponding AF value, values starting from 128 are for other uses. rtnetlink is changed to invoke the AF_UNSPEC dumpit/doit handlers for these families. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
28bb17268b
commit
0f87b1dd01
@@ -15,6 +15,13 @@
|
||||
/* try to find source address in routing lookups */
|
||||
#define FIB_RULE_FIND_SADDR 0x00010000
|
||||
|
||||
/* fib_rules families. values up to 127 are reserved for real address
|
||||
* families, values above 128 may be used arbitrarily.
|
||||
*/
|
||||
#define FIB_RULES_IPV4 AF_INET
|
||||
#define FIB_RULES_IPV6 AF_INET6
|
||||
#define FIB_RULES_DECNET AF_DECnet
|
||||
|
||||
struct fib_rule_hdr {
|
||||
__u8 family;
|
||||
__u8 dst_len;
|
||||
|
Reference in New Issue
Block a user