Loading include/linux/fib_rules.h +0 −8 Original line number Diff line number Diff line Loading @@ -15,14 +15,6 @@ /* 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 #define FIB_RULES_IPMR 128 struct fib_rule_hdr { __u8 family; __u8 dst_len; Loading include/linux/rtnetlink.h +6 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,12 @@ #include <linux/if_addr.h> #include <linux/neighbour.h> /* rtnetlink families. Values up to 127 are reserved for real address * families, values above 128 may be used arbitrarily. */ #define RTNL_FAMILY_IPMR 128 #define RTNL_FAMILY_MAX 128 /**** * Routing/neighbour discovery messages. ****/ Loading include/net/fib_rules.h +1 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,7 @@ static inline u32 frh_get_table(struct fib_rule_hdr *frh, struct nlattr **nla) return frh->table; } extern struct fib_rules_ops *fib_rules_register(struct fib_rules_ops *, struct net *); extern struct fib_rules_ops *fib_rules_register(const struct fib_rules_ops *, struct net *); extern void fib_rules_unregister(struct fib_rules_ops *); extern void fib_rules_cleanup_ops(struct fib_rules_ops *); Loading net/core/fib_rules.c +1 −1 Original line number Diff line number Diff line Loading @@ -122,7 +122,7 @@ errout: } struct fib_rules_ops * fib_rules_register(struct fib_rules_ops *tmpl, struct net *net) fib_rules_register(const struct fib_rules_ops *tmpl, struct net *net) { struct fib_rules_ops *ops; int err; Loading net/core/rtnetlink.c +7 −7 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ int lockdep_rtnl_is_held(void) EXPORT_SYMBOL(lockdep_rtnl_is_held); #endif /* #ifdef CONFIG_PROVE_LOCKING */ static struct rtnl_link *rtnl_msg_handlers[NPROTO]; static struct rtnl_link *rtnl_msg_handlers[RTNL_FAMILY_MAX + 1]; static inline int rtm_msgindex(int msgtype) { Loading @@ -118,7 +118,7 @@ static rtnl_doit_func rtnl_get_doit(int protocol, int msgindex) { struct rtnl_link *tab; if (protocol < NPROTO) if (protocol <= RTNL_FAMILY_MAX) tab = rtnl_msg_handlers[protocol]; else tab = NULL; Loading @@ -133,7 +133,7 @@ static rtnl_dumpit_func rtnl_get_dumpit(int protocol, int msgindex) { struct rtnl_link *tab; if (protocol < NPROTO) if (protocol <= RTNL_FAMILY_MAX) tab = rtnl_msg_handlers[protocol]; else tab = NULL; Loading Loading @@ -167,7 +167,7 @@ int __rtnl_register(int protocol, int msgtype, struct rtnl_link *tab; int msgindex; BUG_ON(protocol < 0 || protocol >= NPROTO); BUG_ON(protocol < 0 || protocol > RTNL_FAMILY_MAX); msgindex = rtm_msgindex(msgtype); tab = rtnl_msg_handlers[protocol]; Loading Loading @@ -219,7 +219,7 @@ int rtnl_unregister(int protocol, int msgtype) { int msgindex; BUG_ON(protocol < 0 || protocol >= NPROTO); BUG_ON(protocol < 0 || protocol > RTNL_FAMILY_MAX); msgindex = rtm_msgindex(msgtype); if (rtnl_msg_handlers[protocol] == NULL) Loading @@ -241,7 +241,7 @@ EXPORT_SYMBOL_GPL(rtnl_unregister); */ void rtnl_unregister_all(int protocol) { BUG_ON(protocol < 0 || protocol >= NPROTO); BUG_ON(protocol < 0 || protocol > RTNL_FAMILY_MAX); kfree(rtnl_msg_handlers[protocol]); rtnl_msg_handlers[protocol] = NULL; Loading Loading @@ -1385,7 +1385,7 @@ static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb) if (s_idx == 0) s_idx = 1; for (idx = 1; idx < NPROTO; idx++) { for (idx = 1; idx <= RTNL_FAMILY_MAX; idx++) { int type = cb->nlh->nlmsg_type-RTM_BASE; if (idx < s_idx || idx == PF_PACKET) continue; Loading Loading
include/linux/fib_rules.h +0 −8 Original line number Diff line number Diff line Loading @@ -15,14 +15,6 @@ /* 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 #define FIB_RULES_IPMR 128 struct fib_rule_hdr { __u8 family; __u8 dst_len; Loading
include/linux/rtnetlink.h +6 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,12 @@ #include <linux/if_addr.h> #include <linux/neighbour.h> /* rtnetlink families. Values up to 127 are reserved for real address * families, values above 128 may be used arbitrarily. */ #define RTNL_FAMILY_IPMR 128 #define RTNL_FAMILY_MAX 128 /**** * Routing/neighbour discovery messages. ****/ Loading
include/net/fib_rules.h +1 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,7 @@ static inline u32 frh_get_table(struct fib_rule_hdr *frh, struct nlattr **nla) return frh->table; } extern struct fib_rules_ops *fib_rules_register(struct fib_rules_ops *, struct net *); extern struct fib_rules_ops *fib_rules_register(const struct fib_rules_ops *, struct net *); extern void fib_rules_unregister(struct fib_rules_ops *); extern void fib_rules_cleanup_ops(struct fib_rules_ops *); Loading
net/core/fib_rules.c +1 −1 Original line number Diff line number Diff line Loading @@ -122,7 +122,7 @@ errout: } struct fib_rules_ops * fib_rules_register(struct fib_rules_ops *tmpl, struct net *net) fib_rules_register(const struct fib_rules_ops *tmpl, struct net *net) { struct fib_rules_ops *ops; int err; Loading
net/core/rtnetlink.c +7 −7 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ int lockdep_rtnl_is_held(void) EXPORT_SYMBOL(lockdep_rtnl_is_held); #endif /* #ifdef CONFIG_PROVE_LOCKING */ static struct rtnl_link *rtnl_msg_handlers[NPROTO]; static struct rtnl_link *rtnl_msg_handlers[RTNL_FAMILY_MAX + 1]; static inline int rtm_msgindex(int msgtype) { Loading @@ -118,7 +118,7 @@ static rtnl_doit_func rtnl_get_doit(int protocol, int msgindex) { struct rtnl_link *tab; if (protocol < NPROTO) if (protocol <= RTNL_FAMILY_MAX) tab = rtnl_msg_handlers[protocol]; else tab = NULL; Loading @@ -133,7 +133,7 @@ static rtnl_dumpit_func rtnl_get_dumpit(int protocol, int msgindex) { struct rtnl_link *tab; if (protocol < NPROTO) if (protocol <= RTNL_FAMILY_MAX) tab = rtnl_msg_handlers[protocol]; else tab = NULL; Loading Loading @@ -167,7 +167,7 @@ int __rtnl_register(int protocol, int msgtype, struct rtnl_link *tab; int msgindex; BUG_ON(protocol < 0 || protocol >= NPROTO); BUG_ON(protocol < 0 || protocol > RTNL_FAMILY_MAX); msgindex = rtm_msgindex(msgtype); tab = rtnl_msg_handlers[protocol]; Loading Loading @@ -219,7 +219,7 @@ int rtnl_unregister(int protocol, int msgtype) { int msgindex; BUG_ON(protocol < 0 || protocol >= NPROTO); BUG_ON(protocol < 0 || protocol > RTNL_FAMILY_MAX); msgindex = rtm_msgindex(msgtype); if (rtnl_msg_handlers[protocol] == NULL) Loading @@ -241,7 +241,7 @@ EXPORT_SYMBOL_GPL(rtnl_unregister); */ void rtnl_unregister_all(int protocol) { BUG_ON(protocol < 0 || protocol >= NPROTO); BUG_ON(protocol < 0 || protocol > RTNL_FAMILY_MAX); kfree(rtnl_msg_handlers[protocol]); rtnl_msg_handlers[protocol] = NULL; Loading Loading @@ -1385,7 +1385,7 @@ static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb) if (s_idx == 0) s_idx = 1; for (idx = 1; idx < NPROTO; idx++) { for (idx = 1; idx <= RTNL_FAMILY_MAX; idx++) { int type = cb->nlh->nlmsg_type-RTM_BASE; if (idx < s_idx || idx == PF_PACKET) continue; Loading