Revert "net: fix information leakage in /proc/net/ptype"
This reverts commite372ecd455
which is commit 47934e06b65637c88a762d9c98329ae6e3238888 upstream. It causes an abi break, and is not anything that the Android kernels worry about, so revert it. Fixes:e372ecd455
("net: fix information leakage in /proc/net/ptype") Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I76aa3718185ce6bc3e1941f68b7f574fda49d08a
This commit is contained in:
parent
46c68a5628
commit
454e00abb3
@ -2409,7 +2409,6 @@ struct packet_type {
|
||||
struct net_device *);
|
||||
bool (*id_match)(struct packet_type *ptype,
|
||||
struct sock *sk);
|
||||
struct net *af_packet_net;
|
||||
void *af_packet_priv;
|
||||
struct list_head list;
|
||||
|
||||
|
@ -281,8 +281,7 @@ static int ptype_seq_show(struct seq_file *seq, void *v)
|
||||
|
||||
if (v == SEQ_START_TOKEN)
|
||||
seq_puts(seq, "Type Device Function\n");
|
||||
else if ((!pt->af_packet_net || net_eq(pt->af_packet_net, seq_file_net(seq))) &&
|
||||
(!pt->dev || net_eq(dev_net(pt->dev), seq_file_net(seq)))) {
|
||||
else if (pt->dev == NULL || dev_net(pt->dev) == seq_file_net(seq)) {
|
||||
if (pt->type == htons(ETH_P_ALL))
|
||||
seq_puts(seq, "ALL ");
|
||||
else
|
||||
|
@ -1715,7 +1715,6 @@ static int fanout_add(struct sock *sk, u16 id, u16 type_flags)
|
||||
match->prot_hook.dev = po->prot_hook.dev;
|
||||
match->prot_hook.func = packet_rcv_fanout;
|
||||
match->prot_hook.af_packet_priv = match;
|
||||
match->prot_hook.af_packet_net = read_pnet(&match->net);
|
||||
match->prot_hook.id_match = match_fanout_group;
|
||||
list_add(&match->list, &fanout_list);
|
||||
}
|
||||
@ -3295,7 +3294,6 @@ static int packet_create(struct net *net, struct socket *sock, int protocol,
|
||||
po->prot_hook.func = packet_rcv_spkt;
|
||||
|
||||
po->prot_hook.af_packet_priv = sk;
|
||||
po->prot_hook.af_packet_net = sock_net(sk);
|
||||
|
||||
if (proto) {
|
||||
po->prot_hook.type = proto;
|
||||
|
Loading…
Reference in New Issue
Block a user