OpenWrt – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
Line 362... | Line 362... | |||
362 | - list_for_each_entry(afi, &net->nft.af_info, list) { |
362 | - list_for_each_entry(afi, &net->nft.af_info, list) { |
|
363 | + list_for_each_entry(afi, &nf_tables_af_info, list) { |
363 | + list_for_each_entry(afi, &nf_tables_af_info, list) { |
|
364 | if (afi->family == family) |
364 | if (afi->family == family) |
|
365 | return afi; |
365 | return afi; |
|
366 | } |
366 | } |
|
367 | @@ -5030,15 +5028,12 @@ void nft_flow_table_iterate(struct net * |
367 | @@ -5019,15 +5017,12 @@ void nft_flow_table_iterate(struct net * |
|
368 | void *data) |
368 | void *data) |
|
369 | { |
369 | { |
|
370 | struct nft_flowtable *flowtable; |
370 | struct nft_flowtable *flowtable; |
|
371 | - const struct nft_af_info *afi; |
371 | - const struct nft_af_info *afi; |
|
372 | const struct nft_table *table; |
372 | const struct nft_table *table; |
|
Line 381... | Line 381... | |||
381 | + list_for_each_entry_rcu(flowtable, &table->flowtables, list) { |
381 | + list_for_each_entry_rcu(flowtable, &table->flowtables, list) { |
|
382 | + iter(&flowtable->data, data); |
382 | + iter(&flowtable->data, data); |
|
383 | } |
383 | } |
|
384 | } |
384 | } |
|
385 | rcu_read_unlock(); |
385 | rcu_read_unlock(); |
|
386 | @@ -6530,21 +6525,6 @@ int nft_data_dump(struct sk_buff *skb, i |
386 | @@ -6514,21 +6509,6 @@ int nft_data_dump(struct sk_buff *skb, i |
|
387 | } |
387 | } |
|
388 | EXPORT_SYMBOL_GPL(nft_data_dump); |
388 | EXPORT_SYMBOL_GPL(nft_data_dump); |
|
Line 389... | Line 389... | |||
389 | |
389 | |
|
390 | -static int __net_init nf_tables_init_net(struct net *net) |
390 | -static int __net_init nf_tables_init_net(struct net *net) |
|
Line 403... | Line 403... | |||
403 | -} |
403 | -} |
|
404 | - |
404 | - |
|
405 | int __nft_release_basechain(struct nft_ctx *ctx) |
405 | int __nft_release_basechain(struct nft_ctx *ctx) |
|
406 | { |
406 | { |
|
407 | struct nft_rule *rule, *nr; |
407 | struct nft_rule *rule, *nr; |
|
408 | @@ -6565,8 +6545,7 @@ int __nft_release_basechain(struct nft_c |
408 | @@ -6549,8 +6529,7 @@ int __nft_release_basechain(struct nft_c |
|
409 | } |
409 | } |
|
410 | EXPORT_SYMBOL_GPL(__nft_release_basechain); |
410 | EXPORT_SYMBOL_GPL(__nft_release_basechain); |
|
Line 411... | Line 411... | |||
411 | |
411 | |
|
412 | -/* Called by nft_unregister_afinfo() from __net_exit path, nfnl_lock is held. */ |
412 | -/* Called by nft_unregister_afinfo() from __net_exit path, nfnl_lock is held. */ |
|
413 | -static void __nft_release_afinfo(struct net *net, struct nft_af_info *afi) |
413 | -static void __nft_release_afinfo(struct net *net, struct nft_af_info *afi) |
|
414 | +static void __nft_release_afinfo(struct net *net) |
414 | +static void __nft_release_afinfo(struct net *net) |
|
415 | { |
415 | { |
|
416 | struct nft_flowtable *flowtable, *nf; |
416 | struct nft_flowtable *flowtable, *nf; |
|
417 | struct nft_table *table, *nt; |
417 | struct nft_table *table, *nt; |
|
418 | @@ -6576,10 +6555,11 @@ static void __nft_release_afinfo(struct |
418 | @@ -6560,10 +6539,11 @@ static void __nft_release_afinfo(struct |
|
419 | struct nft_set *set, *ns; |
419 | struct nft_set *set, *ns; |
|
420 | struct nft_ctx ctx = { |
420 | struct nft_ctx ctx = { |
|
421 | .net = net, |
421 | .net = net, |
|
422 | - .family = afi->family, |
422 | - .family = afi->family, |
|
Line 426... | Line 426... | |||
426 | + ctx.family = table->afi->family; |
426 | + ctx.family = table->afi->family; |
|
427 | + |
427 | + |
|
428 | list_for_each_entry(chain, &table->chains, list) |
428 | list_for_each_entry(chain, &table->chains, list) |
|
429 | nf_tables_unregister_hook(net, table, chain); |
429 | nf_tables_unregister_hook(net, table, chain); |
|
430 | list_for_each_entry(flowtable, &table->flowtables, list) |
430 | list_for_each_entry(flowtable, &table->flowtables, list) |
|
431 | @@ -6620,6 +6600,21 @@ static void __nft_release_afinfo(struct |
431 | @@ -6604,6 +6584,21 @@ static void __nft_release_afinfo(struct |
|
432 | } |
432 | } |
|
433 | } |
433 | } |
|
Line 434... | Line 434... | |||
434 | |
434 | |
|
435 | +static int __net_init nf_tables_init_net(struct net *net) |
435 | +static int __net_init nf_tables_init_net(struct net *net) |