diff options
author | David S. Miller <davem@davemloft.net> | 2013-04-30 03:50:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-30 03:55:20 -0400 |
commit | 58717686cf7c7f5a70b3a8907ade8a3ce74306b1 (patch) | |
tree | 57f5d78524bfd5e65aa9f3943da9c1a3e6ff65b7 /net/batman-adv | |
parent | cff63a52924c6a78fa525c67d81480c85736ff3c (diff) | |
parent | 79f632c71bea0d0864d84d6a4ce78da5a9430f5b (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
drivers/net/ethernet/emulex/benet/be.h
include/net/tcp.h
net/mac802154/mac802154.h
Most conflicts were minor overlapping stuff.
The be2net driver brought in some fixes that added __vlan_put_tag
calls, which in net-next take an additional argument.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/routing.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index 2f1f88923df8..b27a4d792d15 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c | |||
@@ -939,7 +939,7 @@ out: | |||
939 | } | 939 | } |
940 | 940 | ||
941 | static int batadv_check_unicast_ttvn(struct batadv_priv *bat_priv, | 941 | static int batadv_check_unicast_ttvn(struct batadv_priv *bat_priv, |
942 | struct sk_buff *skb) { | 942 | struct sk_buff *skb, int hdr_len) { |
943 | uint8_t curr_ttvn, old_ttvn; | 943 | uint8_t curr_ttvn, old_ttvn; |
944 | struct batadv_orig_node *orig_node; | 944 | struct batadv_orig_node *orig_node; |
945 | struct ethhdr *ethhdr; | 945 | struct ethhdr *ethhdr; |
@@ -948,7 +948,7 @@ static int batadv_check_unicast_ttvn(struct batadv_priv *bat_priv, | |||
948 | int is_old_ttvn; | 948 | int is_old_ttvn; |
949 | 949 | ||
950 | /* check if there is enough data before accessing it */ | 950 | /* check if there is enough data before accessing it */ |
951 | if (pskb_may_pull(skb, sizeof(*unicast_packet) + ETH_HLEN) < 0) | 951 | if (pskb_may_pull(skb, hdr_len + ETH_HLEN) < 0) |
952 | return 0; | 952 | return 0; |
953 | 953 | ||
954 | /* create a copy of the skb (in case of for re-routing) to modify it. */ | 954 | /* create a copy of the skb (in case of for re-routing) to modify it. */ |
@@ -956,7 +956,7 @@ static int batadv_check_unicast_ttvn(struct batadv_priv *bat_priv, | |||
956 | return 0; | 956 | return 0; |
957 | 957 | ||
958 | unicast_packet = (struct batadv_unicast_packet *)skb->data; | 958 | unicast_packet = (struct batadv_unicast_packet *)skb->data; |
959 | ethhdr = (struct ethhdr *)(skb->data + sizeof(*unicast_packet)); | 959 | ethhdr = (struct ethhdr *)(skb->data + hdr_len); |
960 | 960 | ||
961 | /* check if the destination client was served by this node and it is now | 961 | /* check if the destination client was served by this node and it is now |
962 | * roaming. In this case, it means that the node has got a ROAM_ADV | 962 | * roaming. In this case, it means that the node has got a ROAM_ADV |
@@ -1072,8 +1072,7 @@ int batadv_recv_unicast_packet(struct sk_buff *skb, | |||
1072 | 1072 | ||
1073 | if (check < 0) | 1073 | if (check < 0) |
1074 | return NET_RX_DROP; | 1074 | return NET_RX_DROP; |
1075 | 1075 | if (!batadv_check_unicast_ttvn(bat_priv, skb, hdr_size)) | |
1076 | if (!batadv_check_unicast_ttvn(bat_priv, skb)) | ||
1077 | return NET_RX_DROP; | 1076 | return NET_RX_DROP; |
1078 | 1077 | ||
1079 | /* packet for me */ | 1078 | /* packet for me */ |
@@ -1117,7 +1116,7 @@ int batadv_recv_ucast_frag_packet(struct sk_buff *skb, | |||
1117 | if (batadv_check_unicast_packet(bat_priv, skb, hdr_size) < 0) | 1116 | if (batadv_check_unicast_packet(bat_priv, skb, hdr_size) < 0) |
1118 | return NET_RX_DROP; | 1117 | return NET_RX_DROP; |
1119 | 1118 | ||
1120 | if (!batadv_check_unicast_ttvn(bat_priv, skb)) | 1119 | if (!batadv_check_unicast_ttvn(bat_priv, skb, hdr_size)) |
1121 | return NET_RX_DROP; | 1120 | return NET_RX_DROP; |
1122 | 1121 | ||
1123 | unicast_packet = (struct batadv_unicast_frag_packet *)skb->data; | 1122 | unicast_packet = (struct batadv_unicast_frag_packet *)skb->data; |