提交 c7066f70 编写于 作者: P Patrick McHardy

netfilter: fix Kconfig dependencies

Fix dependencies of netfilter realm match: it depends on NET_CLS_ROUTE,
which itself depends on NET_SCHED; this dependency is missing from netfilter.

Since matching on realms is also useful without having NET_SCHED enabled and
the option really only controls whether the tclassid member is included in
route and dst entries, rename the config option to IP_ROUTE_CLASSID and move
it outside of traffic scheduling context to get rid of the NET_SCHED dependeny.
Reported-by: NVladis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: NPatrick McHardy <kaber@trash.net>
上级 ae90bdea
...@@ -72,7 +72,7 @@ struct dst_entry { ...@@ -72,7 +72,7 @@ struct dst_entry {
u32 metrics[RTAX_MAX]; u32 metrics[RTAX_MAX];
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
__u32 tclassid; __u32 tclassid;
#else #else
__u32 __pad2; __u32 __pad2;
......
...@@ -55,7 +55,7 @@ struct fib_nh { ...@@ -55,7 +55,7 @@ struct fib_nh {
int nh_weight; int nh_weight;
int nh_power; int nh_power;
#endif #endif
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
__u32 nh_tclassid; __u32 nh_tclassid;
#endif #endif
int nh_oif; int nh_oif;
...@@ -201,7 +201,7 @@ static inline int fib_lookup(struct net *net, const struct flowi *flp, ...@@ -201,7 +201,7 @@ static inline int fib_lookup(struct net *net, const struct flowi *flp,
extern int __net_init fib4_rules_init(struct net *net); extern int __net_init fib4_rules_init(struct net *net);
extern void __net_exit fib4_rules_exit(struct net *net); extern void __net_exit fib4_rules_exit(struct net *net);
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
extern u32 fib_rules_tclass(struct fib_result *res); extern u32 fib_rules_tclass(struct fib_result *res);
#endif #endif
...@@ -235,7 +235,7 @@ extern struct fib_table *fib_hash_table(u32 id); ...@@ -235,7 +235,7 @@ extern struct fib_table *fib_hash_table(u32 id);
static inline void fib_combine_itag(u32 *itag, struct fib_result *res) static inline void fib_combine_itag(u32 *itag, struct fib_result *res)
{ {
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
#ifdef CONFIG_IP_MULTIPLE_TABLES #ifdef CONFIG_IP_MULTIPLE_TABLES
u32 rtag; u32 rtag;
#endif #endif
......
...@@ -140,6 +140,9 @@ config IP_ROUTE_VERBOSE ...@@ -140,6 +140,9 @@ config IP_ROUTE_VERBOSE
handled by the klogd daemon which is responsible for kernel messages handled by the klogd daemon which is responsible for kernel messages
("man klogd"). ("man klogd").
config IP_ROUTE_CLASSID
bool
config IP_PNP config IP_PNP
bool "IP: kernel level autoconfiguration" bool "IP: kernel level autoconfiguration"
help help
...@@ -655,4 +658,3 @@ config TCP_MD5SIG ...@@ -655,4 +658,3 @@ config TCP_MD5SIG
on the Internet. on the Internet.
If unsure, say N. If unsure, say N.
...@@ -41,12 +41,12 @@ struct fib4_rule { ...@@ -41,12 +41,12 @@ struct fib4_rule {
__be32 srcmask; __be32 srcmask;
__be32 dst; __be32 dst;
__be32 dstmask; __be32 dstmask;
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
u32 tclassid; u32 tclassid;
#endif #endif
}; };
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
u32 fib_rules_tclass(struct fib_result *res) u32 fib_rules_tclass(struct fib_result *res)
{ {
return res->r ? ((struct fib4_rule *) res->r)->tclassid : 0; return res->r ? ((struct fib4_rule *) res->r)->tclassid : 0;
...@@ -165,7 +165,7 @@ static int fib4_rule_configure(struct fib_rule *rule, struct sk_buff *skb, ...@@ -165,7 +165,7 @@ static int fib4_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
if (frh->dst_len) if (frh->dst_len)
rule4->dst = nla_get_be32(tb[FRA_DST]); rule4->dst = nla_get_be32(tb[FRA_DST]);
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
if (tb[FRA_FLOW]) if (tb[FRA_FLOW])
rule4->tclassid = nla_get_u32(tb[FRA_FLOW]); rule4->tclassid = nla_get_u32(tb[FRA_FLOW]);
#endif #endif
...@@ -195,7 +195,7 @@ static int fib4_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh, ...@@ -195,7 +195,7 @@ static int fib4_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh,
if (frh->tos && (rule4->tos != frh->tos)) if (frh->tos && (rule4->tos != frh->tos))
return 0; return 0;
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
if (tb[FRA_FLOW] && (rule4->tclassid != nla_get_u32(tb[FRA_FLOW]))) if (tb[FRA_FLOW] && (rule4->tclassid != nla_get_u32(tb[FRA_FLOW])))
return 0; return 0;
#endif #endif
...@@ -224,7 +224,7 @@ static int fib4_rule_fill(struct fib_rule *rule, struct sk_buff *skb, ...@@ -224,7 +224,7 @@ static int fib4_rule_fill(struct fib_rule *rule, struct sk_buff *skb,
if (rule4->src_len) if (rule4->src_len)
NLA_PUT_BE32(skb, FRA_SRC, rule4->src); NLA_PUT_BE32(skb, FRA_SRC, rule4->src);
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
if (rule4->tclassid) if (rule4->tclassid)
NLA_PUT_U32(skb, FRA_FLOW, rule4->tclassid); NLA_PUT_U32(skb, FRA_FLOW, rule4->tclassid);
#endif #endif
......
...@@ -200,7 +200,7 @@ static inline int nh_comp(const struct fib_info *fi, const struct fib_info *ofi) ...@@ -200,7 +200,7 @@ static inline int nh_comp(const struct fib_info *fi, const struct fib_info *ofi)
#ifdef CONFIG_IP_ROUTE_MULTIPATH #ifdef CONFIG_IP_ROUTE_MULTIPATH
nh->nh_weight != onh->nh_weight || nh->nh_weight != onh->nh_weight ||
#endif #endif
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
nh->nh_tclassid != onh->nh_tclassid || nh->nh_tclassid != onh->nh_tclassid ||
#endif #endif
((nh->nh_flags ^ onh->nh_flags) & ~RTNH_F_DEAD)) ((nh->nh_flags ^ onh->nh_flags) & ~RTNH_F_DEAD))
...@@ -422,7 +422,7 @@ static int fib_get_nhs(struct fib_info *fi, struct rtnexthop *rtnh, ...@@ -422,7 +422,7 @@ static int fib_get_nhs(struct fib_info *fi, struct rtnexthop *rtnh,
nla = nla_find(attrs, attrlen, RTA_GATEWAY); nla = nla_find(attrs, attrlen, RTA_GATEWAY);
nexthop_nh->nh_gw = nla ? nla_get_be32(nla) : 0; nexthop_nh->nh_gw = nla ? nla_get_be32(nla) : 0;
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
nla = nla_find(attrs, attrlen, RTA_FLOW); nla = nla_find(attrs, attrlen, RTA_FLOW);
nexthop_nh->nh_tclassid = nla ? nla_get_u32(nla) : 0; nexthop_nh->nh_tclassid = nla ? nla_get_u32(nla) : 0;
#endif #endif
...@@ -476,7 +476,7 @@ int fib_nh_match(struct fib_config *cfg, struct fib_info *fi) ...@@ -476,7 +476,7 @@ int fib_nh_match(struct fib_config *cfg, struct fib_info *fi)
nla = nla_find(attrs, attrlen, RTA_GATEWAY); nla = nla_find(attrs, attrlen, RTA_GATEWAY);
if (nla && nla_get_be32(nla) != nh->nh_gw) if (nla && nla_get_be32(nla) != nh->nh_gw)
return 1; return 1;
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
nla = nla_find(attrs, attrlen, RTA_FLOW); nla = nla_find(attrs, attrlen, RTA_FLOW);
if (nla && nla_get_u32(nla) != nh->nh_tclassid) if (nla && nla_get_u32(nla) != nh->nh_tclassid)
return 1; return 1;
...@@ -783,7 +783,7 @@ struct fib_info *fib_create_info(struct fib_config *cfg) ...@@ -783,7 +783,7 @@ struct fib_info *fib_create_info(struct fib_config *cfg)
goto err_inval; goto err_inval;
if (cfg->fc_gw && fi->fib_nh->nh_gw != cfg->fc_gw) if (cfg->fc_gw && fi->fib_nh->nh_gw != cfg->fc_gw)
goto err_inval; goto err_inval;
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
if (cfg->fc_flow && fi->fib_nh->nh_tclassid != cfg->fc_flow) if (cfg->fc_flow && fi->fib_nh->nh_tclassid != cfg->fc_flow)
goto err_inval; goto err_inval;
#endif #endif
...@@ -796,7 +796,7 @@ struct fib_info *fib_create_info(struct fib_config *cfg) ...@@ -796,7 +796,7 @@ struct fib_info *fib_create_info(struct fib_config *cfg)
nh->nh_oif = cfg->fc_oif; nh->nh_oif = cfg->fc_oif;
nh->nh_gw = cfg->fc_gw; nh->nh_gw = cfg->fc_gw;
nh->nh_flags = cfg->fc_flags; nh->nh_flags = cfg->fc_flags;
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
nh->nh_tclassid = cfg->fc_flow; nh->nh_tclassid = cfg->fc_flow;
#endif #endif
#ifdef CONFIG_IP_ROUTE_MULTIPATH #ifdef CONFIG_IP_ROUTE_MULTIPATH
...@@ -1006,7 +1006,7 @@ int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, ...@@ -1006,7 +1006,7 @@ int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event,
if (fi->fib_nh->nh_oif) if (fi->fib_nh->nh_oif)
NLA_PUT_U32(skb, RTA_OIF, fi->fib_nh->nh_oif); NLA_PUT_U32(skb, RTA_OIF, fi->fib_nh->nh_oif);
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
if (fi->fib_nh[0].nh_tclassid) if (fi->fib_nh[0].nh_tclassid)
NLA_PUT_U32(skb, RTA_FLOW, fi->fib_nh[0].nh_tclassid); NLA_PUT_U32(skb, RTA_FLOW, fi->fib_nh[0].nh_tclassid);
#endif #endif
...@@ -1031,7 +1031,7 @@ int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, ...@@ -1031,7 +1031,7 @@ int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event,
if (nh->nh_gw) if (nh->nh_gw)
NLA_PUT_BE32(skb, RTA_GATEWAY, nh->nh_gw); NLA_PUT_BE32(skb, RTA_GATEWAY, nh->nh_gw);
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
if (nh->nh_tclassid) if (nh->nh_tclassid)
NLA_PUT_U32(skb, RTA_FLOW, nh->nh_tclassid); NLA_PUT_U32(skb, RTA_FLOW, nh->nh_tclassid);
#endif #endif
......
...@@ -340,7 +340,7 @@ static int ip_rcv_finish(struct sk_buff *skb) ...@@ -340,7 +340,7 @@ static int ip_rcv_finish(struct sk_buff *skb)
} }
} }
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
if (unlikely(skb_dst(skb)->tclassid)) { if (unlikely(skb_dst(skb)->tclassid)) {
struct ip_rt_acct *st = this_cpu_ptr(ip_rt_acct); struct ip_rt_acct *st = this_cpu_ptr(ip_rt_acct);
u32 idx = skb_dst(skb)->tclassid; u32 idx = skb_dst(skb)->tclassid;
......
...@@ -511,7 +511,7 @@ static const struct file_operations rt_cpu_seq_fops = { ...@@ -511,7 +511,7 @@ static const struct file_operations rt_cpu_seq_fops = {
.release = seq_release, .release = seq_release,
}; };
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
static int rt_acct_proc_show(struct seq_file *m, void *v) static int rt_acct_proc_show(struct seq_file *m, void *v)
{ {
struct ip_rt_acct *dst, *src; struct ip_rt_acct *dst, *src;
...@@ -564,14 +564,14 @@ static int __net_init ip_rt_do_proc_init(struct net *net) ...@@ -564,14 +564,14 @@ static int __net_init ip_rt_do_proc_init(struct net *net)
if (!pde) if (!pde)
goto err2; goto err2;
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
pde = proc_create("rt_acct", 0, net->proc_net, &rt_acct_proc_fops); pde = proc_create("rt_acct", 0, net->proc_net, &rt_acct_proc_fops);
if (!pde) if (!pde)
goto err3; goto err3;
#endif #endif
return 0; return 0;
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
err3: err3:
remove_proc_entry("rt_cache", net->proc_net_stat); remove_proc_entry("rt_cache", net->proc_net_stat);
#endif #endif
...@@ -585,7 +585,7 @@ static void __net_exit ip_rt_do_proc_exit(struct net *net) ...@@ -585,7 +585,7 @@ static void __net_exit ip_rt_do_proc_exit(struct net *net)
{ {
remove_proc_entry("rt_cache", net->proc_net_stat); remove_proc_entry("rt_cache", net->proc_net_stat);
remove_proc_entry("rt_cache", net->proc_net); remove_proc_entry("rt_cache", net->proc_net);
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
remove_proc_entry("rt_acct", net->proc_net); remove_proc_entry("rt_acct", net->proc_net);
#endif #endif
} }
...@@ -1784,7 +1784,7 @@ void ip_rt_get_source(u8 *addr, struct rtable *rt) ...@@ -1784,7 +1784,7 @@ void ip_rt_get_source(u8 *addr, struct rtable *rt)
memcpy(addr, &src, 4); memcpy(addr, &src, 4);
} }
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
static void set_class_tag(struct rtable *rt, u32 tag) static void set_class_tag(struct rtable *rt, u32 tag)
{ {
if (!(rt->dst.tclassid & 0xFFFF)) if (!(rt->dst.tclassid & 0xFFFF))
...@@ -1811,7 +1811,7 @@ static void rt_set_nexthop(struct rtable *rt, struct fib_result *res, u32 itag) ...@@ -1811,7 +1811,7 @@ static void rt_set_nexthop(struct rtable *rt, struct fib_result *res, u32 itag)
rt->dst.dev->mtu > 576) rt->dst.dev->mtu > 576)
rt->dst.metrics[RTAX_MTU-1] = 576; rt->dst.metrics[RTAX_MTU-1] = 576;
} }
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
rt->dst.tclassid = FIB_RES_NH(*res).nh_tclassid; rt->dst.tclassid = FIB_RES_NH(*res).nh_tclassid;
#endif #endif
} else } else
...@@ -1827,7 +1827,7 @@ static void rt_set_nexthop(struct rtable *rt, struct fib_result *res, u32 itag) ...@@ -1827,7 +1827,7 @@ static void rt_set_nexthop(struct rtable *rt, struct fib_result *res, u32 itag)
if (dst_metric(&rt->dst, RTAX_ADVMSS) > 65535 - 40) if (dst_metric(&rt->dst, RTAX_ADVMSS) > 65535 - 40)
rt->dst.metrics[RTAX_ADVMSS-1] = 65535 - 40; rt->dst.metrics[RTAX_ADVMSS-1] = 65535 - 40;
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
#ifdef CONFIG_IP_MULTIPLE_TABLES #ifdef CONFIG_IP_MULTIPLE_TABLES
set_class_tag(rt, fib_rules_tclass(res)); set_class_tag(rt, fib_rules_tclass(res));
#endif #endif
...@@ -1883,7 +1883,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr, ...@@ -1883,7 +1883,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,
rth->fl.mark = skb->mark; rth->fl.mark = skb->mark;
rth->fl.fl4_src = saddr; rth->fl.fl4_src = saddr;
rth->rt_src = saddr; rth->rt_src = saddr;
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
rth->dst.tclassid = itag; rth->dst.tclassid = itag;
#endif #endif
rth->rt_iif = rth->rt_iif =
...@@ -2202,7 +2202,7 @@ out: return err; ...@@ -2202,7 +2202,7 @@ out: return err;
rth->fl.mark = skb->mark; rth->fl.mark = skb->mark;
rth->fl.fl4_src = saddr; rth->fl.fl4_src = saddr;
rth->rt_src = saddr; rth->rt_src = saddr;
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
rth->dst.tclassid = itag; rth->dst.tclassid = itag;
#endif #endif
rth->rt_iif = rth->rt_iif =
...@@ -2820,7 +2820,7 @@ static int rt_fill_info(struct net *net, ...@@ -2820,7 +2820,7 @@ static int rt_fill_info(struct net *net,
} }
if (rt->dst.dev) if (rt->dst.dev)
NLA_PUT_U32(skb, RTA_OIF, rt->dst.dev->ifindex); NLA_PUT_U32(skb, RTA_OIF, rt->dst.dev->ifindex);
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
if (rt->dst.tclassid) if (rt->dst.tclassid)
NLA_PUT_U32(skb, RTA_FLOW, rt->dst.tclassid); NLA_PUT_U32(skb, RTA_FLOW, rt->dst.tclassid);
#endif #endif
...@@ -3245,9 +3245,9 @@ static __net_initdata struct pernet_operations rt_genid_ops = { ...@@ -3245,9 +3245,9 @@ static __net_initdata struct pernet_operations rt_genid_ops = {
}; };
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
struct ip_rt_acct __percpu *ip_rt_acct __read_mostly; struct ip_rt_acct __percpu *ip_rt_acct __read_mostly;
#endif /* CONFIG_NET_CLS_ROUTE */ #endif /* CONFIG_IP_ROUTE_CLASSID */
static __initdata unsigned long rhash_entries; static __initdata unsigned long rhash_entries;
static int __init set_rhash_entries(char *str) static int __init set_rhash_entries(char *str)
...@@ -3263,7 +3263,7 @@ int __init ip_rt_init(void) ...@@ -3263,7 +3263,7 @@ int __init ip_rt_init(void)
{ {
int rc = 0; int rc = 0;
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
ip_rt_acct = __alloc_percpu(256 * sizeof(struct ip_rt_acct), __alignof__(struct ip_rt_acct)); ip_rt_acct = __alloc_percpu(256 * sizeof(struct ip_rt_acct), __alignof__(struct ip_rt_acct));
if (!ip_rt_acct) if (!ip_rt_acct)
panic("IP: failed to allocate ip_rt_acct\n"); panic("IP: failed to allocate ip_rt_acct\n");
......
...@@ -886,7 +886,7 @@ config NETFILTER_XT_MATCH_RATEEST ...@@ -886,7 +886,7 @@ config NETFILTER_XT_MATCH_RATEEST
config NETFILTER_XT_MATCH_REALM config NETFILTER_XT_MATCH_REALM
tristate '"realm" match support' tristate '"realm" match support'
depends on NETFILTER_ADVANCED depends on NETFILTER_ADVANCED
select NET_CLS_ROUTE select IP_ROUTE_CLASSID
help help
This option adds a `realm' match, which allows you to use the realm This option adds a `realm' match, which allows you to use the realm
key from the routing subsystem inside iptables. key from the routing subsystem inside iptables.
......
...@@ -243,7 +243,7 @@ config NET_CLS_TCINDEX ...@@ -243,7 +243,7 @@ config NET_CLS_TCINDEX
config NET_CLS_ROUTE4 config NET_CLS_ROUTE4
tristate "Routing decision (ROUTE)" tristate "Routing decision (ROUTE)"
select NET_CLS_ROUTE select IP_ROUTE_CLASSID
select NET_CLS select NET_CLS
---help--- ---help---
If you say Y here, you will be able to classify packets If you say Y here, you will be able to classify packets
...@@ -252,9 +252,6 @@ config NET_CLS_ROUTE4 ...@@ -252,9 +252,6 @@ config NET_CLS_ROUTE4
To compile this code as a module, choose M here: the To compile this code as a module, choose M here: the
module will be called cls_route. module will be called cls_route.
config NET_CLS_ROUTE
bool
config NET_CLS_FW config NET_CLS_FW
tristate "Netfilter mark (FW)" tristate "Netfilter mark (FW)"
select NET_CLS select NET_CLS
......
...@@ -276,7 +276,7 @@ static u32 flow_get_nfct_proto_dst(struct sk_buff *skb) ...@@ -276,7 +276,7 @@ static u32 flow_get_nfct_proto_dst(struct sk_buff *skb)
static u32 flow_get_rtclassid(const struct sk_buff *skb) static u32 flow_get_rtclassid(const struct sk_buff *skb)
{ {
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
if (skb_dst(skb)) if (skb_dst(skb))
return skb_dst(skb)->tclassid; return skb_dst(skb)->tclassid;
#endif #endif
......
...@@ -255,7 +255,7 @@ META_COLLECTOR(int_rtclassid) ...@@ -255,7 +255,7 @@ META_COLLECTOR(int_rtclassid)
if (unlikely(skb_dst(skb) == NULL)) if (unlikely(skb_dst(skb) == NULL))
*err = -1; *err = -1;
else else
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_ROUTE_CLASSID
dst->value = skb_dst(skb)->tclassid; dst->value = skb_dst(skb)->tclassid;
#else #else
dst->value = 0; dst->value = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册