summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/network-coding.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-04-22 20:32:51 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-22 20:32:51 -0400
commit6e0895c2ea326cc4bb11e8fa2f654628d5754c31 (patch)
tree7089303ac11a12edc43a8c4fa1b23974e10937ea /net/batman-adv/network-coding.c
parent55fbbe46e9eb3cbe6c335503f5550855a1128dce (diff)
parent60d509fa6a9c4653a86ad830e4c4b30360b23f0e (diff)
downloadblackbird-op-linux-6e0895c2ea326cc4bb11e8fa2f654628d5754c31.tar.gz
blackbird-op-linux-6e0895c2ea326cc4bb11e8fa2f654628d5754c31.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/emulex/benet/be_main.c drivers/net/ethernet/intel/igb/igb_main.c drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c include/net/scm.h net/batman-adv/routing.c net/ipv4/tcp_input.c The e{uid,gid} --> {uid,gid} credentials fix conflicted with the cleanup in net-next to now pass cred structs around. The be2net driver had a bug fix in 'net' that overlapped with the VLAN interface changes by Patrick McHardy in net-next. An IGB conflict existed because in 'net' the build_skb() support was reverted, and in 'net-next' there was a comment style fix within that code. Several batman-adv conflicts were resolved by making sure that all calls to batadv_is_my_mac() are changed to have a new bat_priv first argument. Eric Dumazet's TS ECR fix in TCP in 'net' conflicted with the F-RTO rewrite in 'net-next', mostly overlapping changes. Thanks to Stephen Rothwell and Antonio Quartulli for help with several of these merge resolutions. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/batman-adv/network-coding.c')
-rw-r--r--net/batman-adv/network-coding.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c
index 6b9a54485314..f7c54305a918 100644
--- a/net/batman-adv/network-coding.c
+++ b/net/batman-adv/network-coding.c
@@ -1484,7 +1484,7 @@ void batadv_nc_skb_store_sniffed_unicast(struct batadv_priv *bat_priv,
{
struct ethhdr *ethhdr = (struct ethhdr *)skb_mac_header(skb);
- if (batadv_is_my_mac(ethhdr->h_dest))
+ if (batadv_is_my_mac(bat_priv, ethhdr->h_dest))
return;
/* Set data pointer to MAC header to mimic packets from our tx path */
@@ -1496,6 +1496,7 @@ void batadv_nc_skb_store_sniffed_unicast(struct batadv_priv *bat_priv,
/**
* batadv_nc_skb_decode_packet - decode given skb using the decode data stored
* in nc_packet
+ * @bat_priv: the bat priv with all the soft interface information
* @skb: unicast skb to decode
* @nc_packet: decode data needed to decode the skb
*
@@ -1503,7 +1504,7 @@ void batadv_nc_skb_store_sniffed_unicast(struct batadv_priv *bat_priv,
* in case of an error.
*/
static struct batadv_unicast_packet *
-batadv_nc_skb_decode_packet(struct sk_buff *skb,
+batadv_nc_skb_decode_packet(struct batadv_priv *bat_priv, struct sk_buff *skb,
struct batadv_nc_packet *nc_packet)
{
const int h_size = sizeof(struct batadv_unicast_packet);
@@ -1537,7 +1538,7 @@ batadv_nc_skb_decode_packet(struct sk_buff *skb,
/* Select the correct unicast header information based on the location
* of our mac address in the coded_packet header
*/
- if (batadv_is_my_mac(coded_packet_tmp.second_dest)) {
+ if (batadv_is_my_mac(bat_priv, coded_packet_tmp.second_dest)) {
/* If we are the second destination the packet was overheard,
* so the Ethernet address must be copied to h_dest and
* pkt_type changed from PACKET_OTHERHOST to PACKET_HOST
@@ -1608,7 +1609,7 @@ batadv_nc_find_decoding_packet(struct batadv_priv *bat_priv,
/* Select the correct packet id based on the location of our mac-addr */
dest = ethhdr->h_source;
- if (!batadv_is_my_mac(coded->second_dest)) {
+ if (!batadv_is_my_mac(bat_priv, coded->second_dest)) {
source = coded->second_source;
packet_id = coded->second_crc;
} else {
@@ -1675,12 +1676,12 @@ static int batadv_nc_recv_coded_packet(struct sk_buff *skb,
ethhdr = (struct ethhdr *)skb_mac_header(skb);
/* Verify frame is destined for us */
- if (!batadv_is_my_mac(ethhdr->h_dest) &&
- !batadv_is_my_mac(coded_packet->second_dest))
+ if (!batadv_is_my_mac(bat_priv, ethhdr->h_dest) &&
+ !batadv_is_my_mac(bat_priv, coded_packet->second_dest))
return NET_RX_DROP;
/* Update stat counter */
- if (batadv_is_my_mac(coded_packet->second_dest))
+ if (batadv_is_my_mac(bat_priv, coded_packet->second_dest))
batadv_inc_counter(bat_priv, BATADV_CNT_NC_SNIFFED);
nc_packet = batadv_nc_find_decoding_packet(bat_priv, ethhdr,
@@ -1698,7 +1699,7 @@ static int batadv_nc_recv_coded_packet(struct sk_buff *skb,
goto free_nc_packet;
/* Decode the packet */
- unicast_packet = batadv_nc_skb_decode_packet(skb, nc_packet);
+ unicast_packet = batadv_nc_skb_decode_packet(bat_priv, skb, nc_packet);
if (!unicast_packet) {
batadv_inc_counter(bat_priv, BATADV_CNT_NC_DECODE_FAILED);
goto free_nc_packet;
OpenPOWER on IntegriCloud