.. | .. |
---|
523 | 523 | q->sock.state = SS_CONNECTED; |
---|
524 | 524 | q->sock.file = file; |
---|
525 | 525 | q->sock.ops = &tap_socket_ops; |
---|
526 | | - sock_init_data(&q->sock, &q->sk); |
---|
| 526 | + sock_init_data_uid(&q->sock, &q->sk, current_fsuid()); |
---|
527 | 527 | q->sk.sk_write_space = tap_sock_write_space; |
---|
528 | 528 | q->sk.sk_destruct = tap_sock_destruct; |
---|
529 | 529 | q->flags = IFF_VNET_HDR | IFF_NO_PI | IFF_TAP; |
---|
.. | .. |
---|
713 | 713 | skb_probe_transport_header(skb); |
---|
714 | 714 | |
---|
715 | 715 | /* Move network header to the right position for VLAN tagged packets */ |
---|
716 | | - if ((skb->protocol == htons(ETH_P_8021Q) || |
---|
717 | | - skb->protocol == htons(ETH_P_8021AD)) && |
---|
718 | | - __vlan_get_protocol(skb, skb->protocol, &depth) != 0) |
---|
| 716 | + if (eth_type_vlan(skb->protocol) && |
---|
| 717 | + vlan_get_protocol_and_depth(skb, skb->protocol, &depth) != 0) |
---|
719 | 718 | skb_set_network_header(skb, depth); |
---|
720 | 719 | |
---|
721 | 720 | rcu_read_lock(); |
---|
.. | .. |
---|
1165 | 1164 | } |
---|
1166 | 1165 | |
---|
1167 | 1166 | /* Move network header to the right position for VLAN tagged packets */ |
---|
1168 | | - if ((skb->protocol == htons(ETH_P_8021Q) || |
---|
1169 | | - skb->protocol == htons(ETH_P_8021AD)) && |
---|
1170 | | - __vlan_get_protocol(skb, skb->protocol, &depth) != 0) |
---|
| 1167 | + if (eth_type_vlan(skb->protocol) && |
---|
| 1168 | + vlan_get_protocol_and_depth(skb, skb->protocol, &depth) != 0) |
---|
1171 | 1169 | skb_set_network_header(skb, depth); |
---|
1172 | 1170 | |
---|
1173 | 1171 | rcu_read_lock(); |
---|