+ if (ROUTE_NENTRIES(sh) >= 2) {
+ sh->hops[0] = htons(prev_hop);
+ sh->hops[1] = target_hop;
+ }
+ sh->type = (sh->type & IP6ROUTE_FLAG_MASK) | IP6ROUTE_TYPE_INVAL;
+ } else {
+ sh->hops[ROUTE_NENTRIES(sh) - sh->segs_remain] = htons(prev_hop);
+ sh->segs_remain--;
+ printfUART("updating source route with prev: 0x%x remaining: %i\n",
+ prev_hop, sh->segs_remain);
+ }
+ }