aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-08-20 16:54:29 -0700
committerDavid S. Miller <davem@davemloft.net>2013-08-20 16:54:29 -0700
commitcc666c53ccb9aaaa55e44ad5feeb425d77ff24f5 (patch)
tree30d0dd2c6348b8259d0c400cf814e3c505f1dca0 /net
parentr8169: remember WOL preferences on driver load (diff)
parentbatman-adv: check return type of unicast packet preparations (diff)
downloadlinux-dev-cc666c53ccb9aaaa55e44ad5feeb425d77ff24f5.tar.xz
linux-dev-cc666c53ccb9aaaa55e44ad5feeb425d77ff24f5.zip
Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge
Included change: - Check if the skb has been correctly prepared before going on
Diffstat (limited to 'net')
-rw-r--r--net/batman-adv/unicast.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c
index 688a0419756b..857e1b8349ee 100644
--- a/net/batman-adv/unicast.c
+++ b/net/batman-adv/unicast.c
@@ -432,12 +432,16 @@ find_router:
switch (packet_type) {
case BATADV_UNICAST:
- batadv_unicast_prepare_skb(skb, orig_node);
+ if (!batadv_unicast_prepare_skb(skb, orig_node))
+ goto out;
+
header_len = sizeof(struct batadv_unicast_packet);
break;
case BATADV_UNICAST_4ADDR:
- batadv_unicast_4addr_prepare_skb(bat_priv, skb, orig_node,
- packet_subtype);
+ if (!batadv_unicast_4addr_prepare_skb(bat_priv, skb, orig_node,
+ packet_subtype))
+ goto out;
+
header_len = sizeof(struct batadv_unicast_4addr_packet);
break;
default: