Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
A function in kernel/bpf/syscall.c which got a bug fix in 'net' was moved to kernel/bpf/verifier.c in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -405,9 +405,6 @@ static inline bool ipv6_datagram_support_addr(struct sock_exterr_skb *serr)
|
||||
* At one point, excluding local errors was a quick test to identify icmp/icmp6
|
||||
* errors. This is no longer true, but the test remained, so the v6 stack,
|
||||
* unlike v4, also honors cmsg requests on all wifi and timestamp errors.
|
||||
*
|
||||
* Timestamp code paths do not initialize the fields expected by cmsg:
|
||||
* the PKTINFO fields in skb->cb[]. Fill those in here.
|
||||
*/
|
||||
static bool ip6_datagram_support_cmsg(struct sk_buff *skb,
|
||||
struct sock_exterr_skb *serr)
|
||||
@@ -419,14 +416,9 @@ static bool ip6_datagram_support_cmsg(struct sk_buff *skb,
|
||||
if (serr->ee.ee_origin == SO_EE_ORIGIN_LOCAL)
|
||||
return false;
|
||||
|
||||
if (!skb->dev)
|
||||
if (!IP6CB(skb)->iif)
|
||||
return false;
|
||||
|
||||
if (skb->protocol == htons(ETH_P_IPV6))
|
||||
IP6CB(skb)->iif = skb->dev->ifindex;
|
||||
else
|
||||
PKTINFO_SKB_CB(skb)->ipi_ifindex = skb->dev->ifindex;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -124,11 +124,14 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
|
||||
max_t(unsigned short, 1, skb_shinfo(skb)->gso_segs));
|
||||
/*
|
||||
* RFC4291 2.5.3
|
||||
* The loopback address must not be used as the source address in IPv6
|
||||
* packets that are sent outside of a single node. [..]
|
||||
* A packet received on an interface with a destination address
|
||||
* of loopback must be dropped.
|
||||
*/
|
||||
if (!(dev->flags & IFF_LOOPBACK) &&
|
||||
ipv6_addr_loopback(&hdr->daddr))
|
||||
if ((ipv6_addr_loopback(&hdr->saddr) ||
|
||||
ipv6_addr_loopback(&hdr->daddr)) &&
|
||||
!(dev->flags & IFF_LOOPBACK))
|
||||
goto err;
|
||||
|
||||
/* RFC4291 Errata ID: 3480
|
||||
|
Reference in New Issue
Block a user