mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor overlapping changes for both merge conflicts. Resolution work done by Stephen Rothwell was used as a reference. Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
commit
60747ef4d1
1746 changed files with 55964 additions and 77032 deletions
|
|
@ -3543,7 +3543,7 @@ static int addrconf_ifdown(struct net_device *dev, int how)
|
|||
/* combine the user config with event to determine if permanent
|
||||
* addresses are to be removed from address hash table
|
||||
*/
|
||||
keep_addr = !(how || _keep_addr <= 0);
|
||||
keep_addr = !(how || _keep_addr <= 0 || idev->cnf.disable_ipv6);
|
||||
|
||||
/* Step 2: clear hash table */
|
||||
for (i = 0; i < IN6_ADDR_HSIZE; i++) {
|
||||
|
|
@ -3599,7 +3599,7 @@ restart:
|
|||
/* re-combine the user config with event to determine if permanent
|
||||
* addresses are to be removed from the interface list
|
||||
*/
|
||||
keep_addr = (!how && _keep_addr > 0);
|
||||
keep_addr = (!how && _keep_addr > 0 && !idev->cnf.disable_ipv6);
|
||||
|
||||
INIT_LIST_HEAD(&del_list);
|
||||
list_for_each_entry_safe(ifa, tmp, &idev->addr_list, if_list) {
|
||||
|
|
|
|||
|
|
@ -952,8 +952,10 @@ calipso_opt_insert(struct ipv6_opt_hdr *hop,
|
|||
memcpy(new, hop, start);
|
||||
ret_val = calipso_genopt((unsigned char *)new, start, buf_len, doi_def,
|
||||
secattr);
|
||||
if (ret_val < 0)
|
||||
if (ret_val < 0) {
|
||||
kfree(new);
|
||||
return ERR_PTR(ret_val);
|
||||
}
|
||||
|
||||
buf_len = start + ret_val;
|
||||
/* At this point buf_len aligns to 4n, so (buf_len & 4) pads to 8n */
|
||||
|
|
|
|||
|
|
@ -519,8 +519,6 @@ static netdev_tx_t __gre6_xmit(struct sk_buff *skb,
|
|||
gre_build_header(skb, tunnel->tun_hlen, tunnel->parms.o_flags,
|
||||
protocol, tunnel->parms.o_key, htonl(tunnel->o_seqno));
|
||||
|
||||
skb_set_inner_protocol(skb, protocol);
|
||||
|
||||
return ip6_tnl_xmit(skb, dev, dsfield, fl6, encap_limit, pmtu,
|
||||
NEXTHDR_GRE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ static int ping_v6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
|
|||
struct icmp6hdr user_icmph;
|
||||
int addr_type;
|
||||
struct in6_addr *daddr;
|
||||
int iif = 0;
|
||||
int oif = 0;
|
||||
struct flowi6 fl6;
|
||||
int err;
|
||||
struct dst_entry *dst;
|
||||
|
|
@ -78,25 +78,30 @@ static int ping_v6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
|
|||
if (u->sin6_family != AF_INET6) {
|
||||
return -EAFNOSUPPORT;
|
||||
}
|
||||
if (sk->sk_bound_dev_if &&
|
||||
sk->sk_bound_dev_if != u->sin6_scope_id) {
|
||||
return -EINVAL;
|
||||
}
|
||||
daddr = &(u->sin6_addr);
|
||||
iif = u->sin6_scope_id;
|
||||
if (__ipv6_addr_needs_scope_id(ipv6_addr_type(daddr)))
|
||||
oif = u->sin6_scope_id;
|
||||
} else {
|
||||
if (sk->sk_state != TCP_ESTABLISHED)
|
||||
return -EDESTADDRREQ;
|
||||
daddr = &sk->sk_v6_daddr;
|
||||
}
|
||||
|
||||
if (!iif)
|
||||
iif = sk->sk_bound_dev_if;
|
||||
if (!oif)
|
||||
oif = sk->sk_bound_dev_if;
|
||||
|
||||
if (!oif)
|
||||
oif = np->sticky_pktinfo.ipi6_ifindex;
|
||||
|
||||
if (!oif && ipv6_addr_is_multicast(daddr))
|
||||
oif = np->mcast_oif;
|
||||
else if (!oif)
|
||||
oif = np->ucast_oif;
|
||||
|
||||
addr_type = ipv6_addr_type(daddr);
|
||||
if (__ipv6_addr_needs_scope_id(addr_type) && !iif)
|
||||
return -EINVAL;
|
||||
if (addr_type & IPV6_ADDR_MAPPED)
|
||||
if ((__ipv6_addr_needs_scope_id(addr_type) && !oif) ||
|
||||
(addr_type & IPV6_ADDR_MAPPED) ||
|
||||
(oif && sk->sk_bound_dev_if && oif != sk->sk_bound_dev_if))
|
||||
return -EINVAL;
|
||||
|
||||
/* TODO: use ip6_datagram_send_ctl to get options from cmsg */
|
||||
|
|
@ -106,16 +111,12 @@ static int ping_v6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
|
|||
fl6.flowi6_proto = IPPROTO_ICMPV6;
|
||||
fl6.saddr = np->saddr;
|
||||
fl6.daddr = *daddr;
|
||||
fl6.flowi6_oif = oif;
|
||||
fl6.flowi6_mark = sk->sk_mark;
|
||||
fl6.fl6_icmp_type = user_icmph.icmp6_type;
|
||||
fl6.fl6_icmp_code = user_icmph.icmp6_code;
|
||||
security_sk_classify_flow(sk, flowi6_to_flowi(&fl6));
|
||||
|
||||
if (!fl6.flowi6_oif && ipv6_addr_is_multicast(&fl6.daddr))
|
||||
fl6.flowi6_oif = np->mcast_oif;
|
||||
else if (!fl6.flowi6_oif)
|
||||
fl6.flowi6_oif = np->ucast_oif;
|
||||
|
||||
ipc6.tclass = np->tclass;
|
||||
fl6.flowlabel = ip6_make_flowinfo(ipc6.tclass, fl6.flowlabel);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue