Skip to content

Commit

Permalink
[SQUASH ME] ng_sixlowpan_iphc: more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed Apr 29, 2015
1 parent dcb24f9 commit d979b42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 2 additions & 8 deletions sys/net/network_layer/ng_sixlowpan/iphc/ng_sixlowpan_iphc.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,9 @@ static network_uint64_t _init_iid(uint8_t *l2addr, size_t l2addr_len)
res = byteorder_htonll(0x000000fffe000000);

if (l2addr_len == 1) {
res.u8[0] = 0x02; /* never globally unique */
res.u8[7] = l2addr[0];
}
else if (l2addr_len == 2) {
res.u8[0] = 0x02; /* never globally unique */
res.u8[6] = l2addr[0];
res.u8[7] = l2addr[1];
}
Expand Down Expand Up @@ -395,9 +393,7 @@ bool ng_sixlowpan_iphc_decode(ng_pktsnip_t *pkt)

/* remove 6LoWPAN dispatch */
payload = ng_pktbuf_add(pkt, pkt->data, payload_offset, NG_NETTYPE_SIXLOWPAN);
LL_DELETE(pkt, payload);
payload->next = NULL;
ng_pktbuf_release(payload);
pkt = ng_pktbuf_remove_snip(pkt, payload);

/* insert IPv6 header */
ipv6->next = pkt->next;
Expand Down Expand Up @@ -687,9 +683,7 @@ bool ng_sixlowpan_iphc_encode(ng_pktsnip_t *pkt)
ng_pktbuf_realloc_data(dispatch, (size_t)inline_pos);

/* remove IPv6 header */
LL_DELETE(pkt, pkt->next);
pkt->next->next = NULL;
ng_pktbuf_release(pkt->next);
pkt = ng_pktbuf_remove_snip(pkt, pkt->next);

/* insert dispatch into packet */
dispatch->next = pkt->next;
Expand Down
2 changes: 0 additions & 2 deletions sys/net/network_layer/ng_sixlowpan/netif/ng_sixlowpan_netif.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ void ng_sixlowpan_netif_add(kernel_pid_t pid, uint16_t max_frag_size)
sixlow_ifs[i].max_frag_size = max_frag_size;
#ifdef MODULE_NG_SIXLOWPAN_IPHC
sixlow_ifs[i].iphc_enabled = true;
#else
sixlow_ifs[i].iphc_enabled = false;
#endif

return;
Expand Down

0 comments on commit d979b42

Please sign in to comment.