.. | .. |
---|
22 | 22 | #include <linux/proc_fs.h> |
---|
23 | 23 | #include <net/ping.h> |
---|
24 | 24 | |
---|
25 | | -static void ping_v6_destroy(struct sock *sk) |
---|
26 | | -{ |
---|
27 | | - inet6_destroy_sock(sk); |
---|
28 | | -} |
---|
29 | | - |
---|
30 | 25 | /* Compatibility glue so we can support IPv6 when it's compiled as a module */ |
---|
31 | 26 | static int dummy_ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len, |
---|
32 | 27 | int *addr_len) |
---|
.. | .. |
---|
101 | 96 | addr_type = ipv6_addr_type(daddr); |
---|
102 | 97 | if ((__ipv6_addr_needs_scope_id(addr_type) && !oif) || |
---|
103 | 98 | (addr_type & IPV6_ADDR_MAPPED) || |
---|
104 | | - (oif && sk->sk_bound_dev_if && oif != sk->sk_bound_dev_if)) |
---|
| 99 | + (oif && sk->sk_bound_dev_if && oif != sk->sk_bound_dev_if && |
---|
| 100 | + l3mdev_master_ifindex_by_index(sock_net(sk), oif) != sk->sk_bound_dev_if)) |
---|
105 | 101 | return -EINVAL; |
---|
106 | 102 | |
---|
107 | 103 | /* TODO: use ip6_datagram_send_ctl to get options from cmsg */ |
---|
.. | .. |
---|
171 | 167 | .owner = THIS_MODULE, |
---|
172 | 168 | .init = ping_init_sock, |
---|
173 | 169 | .close = ping_close, |
---|
174 | | - .destroy = ping_v6_destroy, |
---|
175 | 170 | .connect = ip6_datagram_connect_v6_only, |
---|
176 | 171 | .disconnect = __udp_disconnect, |
---|
177 | 172 | .setsockopt = ipv6_setsockopt, |
---|