batman-adv: check skb preparation return value
Fix bogus merge conflict resolution by checking the return values of the skb preparation routines. Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
This commit is contained in:
@@ -267,11 +267,14 @@ int batadv_send_skb_generic_unicast(struct batadv_priv *bat_priv,
|
|||||||
|
|
||||||
switch (packet_type) {
|
switch (packet_type) {
|
||||||
case BATADV_UNICAST:
|
case BATADV_UNICAST:
|
||||||
batadv_send_skb_prepare_unicast(skb, orig_node);
|
if (!batadv_send_skb_prepare_unicast(skb, orig_node))
|
||||||
|
goto out;
|
||||||
break;
|
break;
|
||||||
case BATADV_UNICAST_4ADDR:
|
case BATADV_UNICAST_4ADDR:
|
||||||
batadv_send_skb_prepare_unicast_4addr(bat_priv, skb, orig_node,
|
if (!batadv_send_skb_prepare_unicast_4addr(bat_priv, skb,
|
||||||
packet_subtype);
|
orig_node,
|
||||||
|
packet_subtype))
|
||||||
|
goto out;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* this function supports UNICAST and UNICAST_4ADDR only. It
|
/* this function supports UNICAST and UNICAST_4ADDR only. It
|
||||||
|
Reference in New Issue
Block a user