Skip to content

Instantly share code, notes, and snippets.

@kxxt
Created May 7, 2023 10:38
Show Gist options
  • Select an option

  • Save kxxt/9e6d0edc57e2dbc62ac8ba09383230ef to your computer and use it in GitHub Desktop.

Select an option

Save kxxt/9e6d0edc57e2dbc62ac8ba09383230ef to your computer and use it in GitHub Desktop.
diff --git a/net/netfilter/xt_qtaguid.c b/net/netfilter/xt_qtaguid.c
index 635fcf7a8a8e..28c34a726666 100644
--- a/net/netfilter/xt_qtaguid.c
+++ b/net/netfilter/xt_qtaguid.c
@@ -739,7 +739,7 @@ static int iface_stat_fmt_proc_show(struct seq_file *m, void *v)
{
struct proc_iface_stat_fmt_info *p = m->private;
struct iface_stat *iface_entry;
- struct rtnl_link_stats64 dev_stats, *stats;
+ struct rtnl_link_stats64 *stats;
struct rtnl_link_stats64 no_dev_stats = {0};
@@ -747,13 +747,7 @@ static int iface_stat_fmt_proc_show(struct seq_file *m, void *v)
current->pid, current->tgid, from_kuid(&init_user_ns, current_fsuid()));
iface_entry = list_entry(v, struct iface_stat, list);
-
- if (iface_entry->active) {
- stats = dev_get_stats(iface_entry->net_dev,
- &dev_stats);
- } else {
- stats = &no_dev_stats;
- }
+ stats = &no_dev_stats;
/*
* If the meaning of the data changes, then update the fmtX
* string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment