|
@@ -203,7 +203,7 @@ static int dsmark_enqueue(struct sk_buff *skb, struct Qdisc *sch)
|
|
pr_debug("%s(skb %p,sch %p,[qdisc %p])\n", __func__, skb, sch, p);
|
|
pr_debug("%s(skb %p,sch %p,[qdisc %p])\n", __func__, skb, sch, p);
|
|
|
|
|
|
if (p->set_tc_index) {
|
|
if (p->set_tc_index) {
|
|
- switch (skb->protocol) {
|
|
|
|
|
|
+ switch (tc_skb_protocol(skb)) {
|
|
case htons(ETH_P_IP):
|
|
case htons(ETH_P_IP):
|
|
if (skb_cow_head(skb, sizeof(struct iphdr)))
|
|
if (skb_cow_head(skb, sizeof(struct iphdr)))
|
|
goto drop;
|
|
goto drop;
|
|
@@ -289,7 +289,7 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
|
|
index = skb->tc_index & (p->indices - 1);
|
|
index = skb->tc_index & (p->indices - 1);
|
|
pr_debug("index %d->%d\n", skb->tc_index, index);
|
|
pr_debug("index %d->%d\n", skb->tc_index, index);
|
|
|
|
|
|
- switch (skb->protocol) {
|
|
|
|
|
|
+ switch (tc_skb_protocol(skb)) {
|
|
case htons(ETH_P_IP):
|
|
case htons(ETH_P_IP):
|
|
ipv4_change_dsfield(ip_hdr(skb), p->mask[index],
|
|
ipv4_change_dsfield(ip_hdr(skb), p->mask[index],
|
|
p->value[index]);
|
|
p->value[index]);
|
|
@@ -306,7 +306,7 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
|
|
*/
|
|
*/
|
|
if (p->mask[index] != 0xff || p->value[index])
|
|
if (p->mask[index] != 0xff || p->value[index])
|
|
pr_warn("%s: unsupported protocol %d\n",
|
|
pr_warn("%s: unsupported protocol %d\n",
|
|
- __func__, ntohs(skb->protocol));
|
|
|
|
|
|
+ __func__, ntohs(tc_skb_protocol(skb)));
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|