diff options
| author | James Morris <james.l.morris@oracle.com> | 2014-09-30 10:44:04 -0400 |
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2014-09-30 10:44:04 -0400 |
| commit | 6c8ff877cdf13cd5287ed9d700cfb6cb70e2bfa1 (patch) | |
| tree | 2ab49b7d19fb69cdae5b6be9e7ba44f6cf3d45ef /net | |
| parent | 35e1efd25a9e7d5cf2884fa23441ab87353849bb (diff) | |
| parent | 19583ca584d6f574384e17fe7613dfaeadcdc4a6 (diff) | |
Merge commit 'v3.16' into next
Diffstat (limited to 'net')
56 files changed, 536 insertions, 337 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index ad2ac3c00398..dd11f612e03e 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
| @@ -627,8 +627,6 @@ static void vlan_dev_uninit(struct net_device *dev) | |||
| 627 | struct vlan_dev_priv *vlan = vlan_dev_priv(dev); | 627 | struct vlan_dev_priv *vlan = vlan_dev_priv(dev); |
| 628 | int i; | 628 | int i; |
| 629 | 629 | ||
| 630 | free_percpu(vlan->vlan_pcpu_stats); | ||
| 631 | vlan->vlan_pcpu_stats = NULL; | ||
| 632 | for (i = 0; i < ARRAY_SIZE(vlan->egress_priority_map); i++) { | 630 | for (i = 0; i < ARRAY_SIZE(vlan->egress_priority_map); i++) { |
| 633 | while ((pm = vlan->egress_priority_map[i]) != NULL) { | 631 | while ((pm = vlan->egress_priority_map[i]) != NULL) { |
| 634 | vlan->egress_priority_map[i] = pm->next; | 632 | vlan->egress_priority_map[i] = pm->next; |
| @@ -785,6 +783,15 @@ static const struct net_device_ops vlan_netdev_ops = { | |||
| 785 | .ndo_get_lock_subclass = vlan_dev_get_lock_subclass, | 783 | .ndo_get_lock_subclass = vlan_dev_get_lock_subclass, |
| 786 | }; | 784 | }; |
| 787 | 785 | ||
| 786 | static void vlan_dev_free(struct net_device *dev) | ||
| 787 | { | ||
| 788 | struct vlan_dev_priv *vlan = vlan_dev_priv(dev); | ||
| 789 | |||
| 790 | free_percpu(vlan->vlan_pcpu_stats); | ||
| 791 | vlan->vlan_pcpu_stats = NULL; | ||
| 792 | free_netdev(dev); | ||
| 793 | } | ||
| 794 | |||
| 788 | void vlan_setup(struct net_device *dev) | 795 | void vlan_setup(struct net_device *dev) |
| 789 | { | 796 | { |
| 790 | ether_setup(dev); | 797 | ether_setup(dev); |
| @@ -794,7 +801,7 @@ void vlan_setup(struct net_device *dev) | |||
| 794 | dev->tx_queue_len = 0; | 801 | dev->tx_queue_len = 0; |
| 795 | 802 | ||
| 796 | dev->netdev_ops = &vlan_netdev_ops; | 803 | dev->netdev_ops = &vlan_netdev_ops; |
| 797 | dev->destructor = free_netdev; | 804 | dev->destructor = vlan_dev_free; |
| 798 | dev->ethtool_ops = &vlan_ethtool_ops; | 805 | dev->ethtool_ops = &vlan_ethtool_ops; |
| 799 | 806 | ||
| 800 | memset(dev->broadcast, 0, ETH_ALEN); | 807 | memset(dev->broadcast, 0, ETH_ALEN); |
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 01a1082e02b3..bfcf6be1d665 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
| @@ -1489,8 +1489,6 @@ static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, | |||
| 1489 | goto drop; | 1489 | goto drop; |
| 1490 | 1490 | ||
| 1491 | /* Queue packet (standard) */ | 1491 | /* Queue packet (standard) */ |
| 1492 | skb->sk = sock; | ||
| 1493 | |||
| 1494 | if (sock_queue_rcv_skb(sock, skb) < 0) | 1492 | if (sock_queue_rcv_skb(sock, skb) < 0) |
| 1495 | goto drop; | 1493 | goto drop; |
| 1496 | 1494 | ||
| @@ -1644,7 +1642,6 @@ static int atalk_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr | |||
| 1644 | if (!skb) | 1642 | if (!skb) |
| 1645 | goto out; | 1643 | goto out; |
| 1646 | 1644 | ||
| 1647 | skb->sk = sk; | ||
| 1648 | skb_reserve(skb, ddp_dl->header_length); | 1645 | skb_reserve(skb, ddp_dl->header_length); |
| 1649 | skb_reserve(skb, dev->hard_header_len); | 1646 | skb_reserve(skb, dev->hard_header_len); |
| 1650 | skb->dev = dev; | 1647 | skb->dev = dev; |
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index 6f0d9ec37950..a957c8140721 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c | |||
| @@ -800,11 +800,6 @@ static int batadv_check_claim_group(struct batadv_priv *bat_priv, | |||
| 800 | bla_dst = (struct batadv_bla_claim_dst *)hw_dst; | 800 | bla_dst = (struct batadv_bla_claim_dst *)hw_dst; |
| 801 | bla_dst_own = &bat_priv->bla.claim_dest; | 801 | bla_dst_own = &bat_priv->bla.claim_dest; |
| 802 | 802 | ||
| 803 | /* check if it is a claim packet in general */ | ||
| 804 | if (memcmp(bla_dst->magic, bla_dst_own->magic, | ||
| 805 | sizeof(bla_dst->magic)) != 0) | ||
| 806 | return 0; | ||
| 807 | |||
| 808 | /* if announcement packet, use the source, | 803 | /* if announcement packet, use the source, |
| 809 | * otherwise assume it is in the hw_src | 804 | * otherwise assume it is in the hw_src |
| 810 | */ | 805 | */ |
| @@ -866,12 +861,13 @@ static int batadv_bla_process_claim(struct batadv_priv *bat_priv, | |||
| 866 | struct batadv_hard_iface *primary_if, | 861 | struct batadv_hard_iface *primary_if, |
| 867 | struct sk_buff *skb) | 862 | struct sk_buff *skb) |
| 868 | { | 863 | { |
| 869 | struct batadv_bla_claim_dst *bla_dst; | 864 | struct batadv_bla_claim_dst *bla_dst, *bla_dst_own; |
| 870 | uint8_t *hw_src, *hw_dst; | 865 | uint8_t *hw_src, *hw_dst; |
| 871 | struct vlan_ethhdr *vhdr; | 866 | struct vlan_hdr *vhdr, vhdr_buf; |
| 872 | struct ethhdr *ethhdr; | 867 | struct ethhdr *ethhdr; |
| 873 | struct arphdr *arphdr; | 868 | struct arphdr *arphdr; |
| 874 | unsigned short vid; | 869 | unsigned short vid; |
| 870 | int vlan_depth = 0; | ||
| 875 | __be16 proto; | 871 | __be16 proto; |
| 876 | int headlen; | 872 | int headlen; |
| 877 | int ret; | 873 | int ret; |
| @@ -882,9 +878,24 @@ static int batadv_bla_process_claim(struct batadv_priv *bat_priv, | |||
| 882 | proto = ethhdr->h_proto; | 878 | proto = ethhdr->h_proto; |
| 883 | headlen = ETH_HLEN; | 879 | headlen = ETH_HLEN; |
| 884 | if (vid & BATADV_VLAN_HAS_TAG) { | 880 | if (vid & BATADV_VLAN_HAS_TAG) { |
| 885 | vhdr = vlan_eth_hdr(skb); | 881 | /* Traverse the VLAN/Ethertypes. |
| 886 | proto = vhdr->h_vlan_encapsulated_proto; | 882 | * |
| 887 | headlen += VLAN_HLEN; | 883 | * At this point it is known that the first protocol is a VLAN |
| 884 | * header, so start checking at the encapsulated protocol. | ||
| 885 | * | ||
| 886 | * The depth of the VLAN headers is recorded to drop BLA claim | ||
| 887 | * frames encapsulated into multiple VLAN headers (QinQ). | ||
| 888 | */ | ||
| 889 | do { | ||
| 890 | vhdr = skb_header_pointer(skb, headlen, VLAN_HLEN, | ||
