- if(priorityinheritance && type == ETH_P_IP && packet->len >= ether_size + ip_size)
- packet->priority = packet->data[15];
+ if(priorityinheritance) {
+ if(type == ETH_P_IP && packet->len >= ether_size + ip_size)
+ packet->priority = packet->data[15];
+ else if(type == ETH_P_IPV6 && packet->len >= ether_size + ip6_size)
+ packet->priority = ((packet->data[14] & 0x0f) << 4) | (packet->data[15] >> 4);
+ }