.. | .. |
---|
23 | 23 | pinfo.pdi_flags = 0; |
---|
24 | 24 | if (po->running) |
---|
25 | 25 | pinfo.pdi_flags |= PDI_RUNNING; |
---|
26 | | - if (po->auxdata) |
---|
| 26 | + if (packet_sock_flag(po, PACKET_SOCK_AUXDATA)) |
---|
27 | 27 | pinfo.pdi_flags |= PDI_AUXDATA; |
---|
28 | | - if (po->origdev) |
---|
| 28 | + if (packet_sock_flag(po, PACKET_SOCK_ORIGDEV)) |
---|
29 | 29 | pinfo.pdi_flags |= PDI_ORIGDEV; |
---|
30 | 30 | if (po->has_vnet_hdr) |
---|
31 | 31 | pinfo.pdi_flags |= PDI_VNETHDR; |
---|
.. | .. |
---|
143 | 143 | rp = nlmsg_data(nlh); |
---|
144 | 144 | rp->pdiag_family = AF_PACKET; |
---|
145 | 145 | rp->pdiag_type = sk->sk_type; |
---|
146 | | - rp->pdiag_num = ntohs(po->num); |
---|
| 146 | + rp->pdiag_num = ntohs(READ_ONCE(po->num)); |
---|
147 | 147 | rp->pdiag_ino = sk_ino; |
---|
148 | 148 | sock_diag_save_cookie(sk, rp->pdiag_cookie); |
---|
149 | 149 | |
---|