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