Hi Linus,
On Wed, Jul 03, 2013 at 01:56:17AM +0200, Linus Lüssing wrote:
diff --git a/distributed-arp-table.c b/distributed-arp-table.c index f2543c2..12e84f7 100644 --- a/distributed-arp-table.c +++ b/distributed-arp-table.c @@ -1026,11 +1026,11 @@ bool batadv_dat_snoop_incoming_arp_request(struct batadv_priv *bat_priv, * that a node not using the 4addr packet format doesn't support it. */ if (hdr_size == sizeof(struct batadv_unicast_4addr_packet))
err = batadv_send_skb_unicast_4addr(bat_priv, skb_new,
BATADV_P_DAT_CACHE_REPLY,
vid);
err = batadv_send_skb_via_tt_4addr(bat_priv, skb_new,
BATADV_P_DAT_CACHE_REPLY,
elsevid);
err = batadv_send_skb_unicast(bat_priv, skb_new, vid);
err = batadv_send_skb_via_tt(bat_priv, skb_new, vid);
if (!err) {
now that the functions do not return 0 or 1 anymore this check should be changed to "ret != DROP". We can't assume that the SUCCESS define is 0.
batadv_inc_counter(bat_priv, BATADV_CNT_DAT_CACHED_REPLY_TX);
diff --git a/send.c b/send.c index b631355..29b42fe 100644 --- a/send.c +++ b/send.c @@ -235,36 +235,32 @@ out: }
/**
- batadv_send_generic_unicast_skb - send an skb as unicast
- batadv_send_skb_unicast - encapsulate and send an skb via unicast
- @bat_priv: the bat priv with all the soft interface information
- @skb: payload to send
- @packet_type: the batman unicast packet type to use
- @packet_subtype: the unicast 4addr packet subtype (only relevant for unicast
- 4addr packets)
- @orig_node: the originator to send the packet to
- @vid: the vid to be used to search the translation table
- Returns 1 in case of error or 0 otherwise.
- Wrap the given skb into a batman-adv unicast or unicast-4addr header
- depending on whether BATADV_UNICAST or BATADV_UNICAST_4ADDR was supplied
- as packet_type. Then send this frame to the given orig_node and release a
- reference to this orig_node.
- Return NET_RX_DROP in case of error or NET_RX_SUCCESS otherwise.
This function is in the TX path, therefore you should use NET_XMIT_SUCCESS/DROP rather than their RX version.
Same comments apply to the other functions.
Cheers,