diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-18 20:33:01 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-18 20:33:01 -0700 |
| commit | bd479f293370d863953aba59130bcc7ae867dd10 (patch) | |
| tree | b6987c9c622d1f98b680d6fce1447972d717761c /net/batman-adv/soft-interface.c | |
| parent | 68c91d377c9bd14cbe35c647ed3b847f7862c958 (diff) | |
| parent | b36f4be3de1b123d8601de062e7dbfc904f305fb (diff) | |
| download | lwn-bd479f293370d863953aba59130bcc7ae867dd10.tar.gz lwn-bd479f293370d863953aba59130bcc7ae867dd10.zip | |
Merge 3.11-rc6 into usb-next
We want these USB fixes in this branch as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/batman-adv/soft-interface.c')
| -rw-r--r-- | net/batman-adv/soft-interface.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 700d0b49742d..0f04e1c302b4 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@ -180,6 +180,9 @@ static int batadv_interface_tx(struct sk_buff *skb, if (batadv_bla_tx(bat_priv, skb, vid)) goto dropped; + /* skb->data might have been reallocated by batadv_bla_tx() */ + ethhdr = (struct ethhdr *)skb->data; + /* Register the client MAC in the transtable */ if (!is_multicast_ether_addr(ethhdr->h_source)) batadv_tt_local_add(soft_iface, ethhdr->h_source, skb->skb_iif); @@ -220,6 +223,10 @@ static int batadv_interface_tx(struct sk_buff *skb, default: break; } + + /* reminder: ethhdr might have become unusable from here on + * (batadv_gw_is_dhcp_target() might have reallocated skb data) + */ } /* ethernet packet should be broadcasted */ @@ -266,7 +273,7 @@ static int batadv_interface_tx(struct sk_buff *skb, /* unicast packet */ } else { if (atomic_read(&bat_priv->gw_mode) != BATADV_GW_MODE_OFF) { - ret = batadv_gw_out_of_range(bat_priv, skb, ethhdr); + ret = batadv_gw_out_of_range(bat_priv, skb); if (ret) goto dropped; } |
