llsec: Calling NETSTACK_LLSEC.on_frame_created()
This commit is contained in:
parent
8659c97fb0
commit
eaae9f1100
2 changed files with 7 additions and 5 deletions
|
@ -614,6 +614,11 @@ send_packet(mac_callback_t mac_callback, void *mac_callback_ptr,
|
||||||
return MAC_TX_ERR_FATAL;
|
return MAC_TX_ERR_FATAL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
packetbuf_compact();
|
||||||
|
|
||||||
|
if(!NETSTACK_LLSEC.on_frame_created()) {
|
||||||
|
return MAC_TX_ERR_FATAL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Make sure that the packet is longer or equal to the shortest
|
/* Make sure that the packet is longer or equal to the shortest
|
||||||
packet length. */
|
packet length. */
|
||||||
|
@ -628,9 +633,6 @@ send_packet(mac_callback_t mac_callback, void *mac_callback_ptr,
|
||||||
transmit_len = SHORTEST_PACKET_SIZE;
|
transmit_len = SHORTEST_PACKET_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
packetbuf_compact();
|
|
||||||
|
|
||||||
#ifdef NETSTACK_ENCRYPT
|
#ifdef NETSTACK_ENCRYPT
|
||||||
NETSTACK_ENCRYPT();
|
NETSTACK_ENCRYPT();
|
||||||
#endif /* NETSTACK_ENCRYPT */
|
#endif /* NETSTACK_ENCRYPT */
|
||||||
|
|
|
@ -120,7 +120,7 @@ send_one_packet(mac_callback_t sent, void *ptr)
|
||||||
packetbuf_set_attr(PACKETBUF_ATTR_MAC_ACK, 1);
|
packetbuf_set_attr(PACKETBUF_ATTR_MAC_ACK, 1);
|
||||||
#endif /* NULLRDC_802154_AUTOACK || NULLRDC_802154_AUTOACK_HW */
|
#endif /* NULLRDC_802154_AUTOACK || NULLRDC_802154_AUTOACK_HW */
|
||||||
|
|
||||||
if(NETSTACK_FRAMER.create() < 0) {
|
if((NETSTACK_FRAMER.create() < 0) || !NETSTACK_LLSEC.on_frame_created()) {
|
||||||
/* Failed to allocate space for headers */
|
/* Failed to allocate space for headers */
|
||||||
PRINTF("nullrdc: send failed, too large header\n");
|
PRINTF("nullrdc: send failed, too large header\n");
|
||||||
ret = MAC_TX_ERR_FATAL;
|
ret = MAC_TX_ERR_FATAL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue