1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## kernel_2.6.22.dpatch by Dermot Bradley <dermot.bradley@sla-networks.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Code changes required for linux 2.6.22.
@DPATCH@
diff -urN zaptel-1.2.18.SLA/ztd-eth.c zaptel-1.2.18.SLA.new/ztd-eth.c
--- zaptel-1.2.18.SLA/ztd-eth.c 2007-01-31 19:01:33.000000000 +0000
+++ zaptel-1.2.18.SLA.new/ztd-eth.c 2007-07-03 03:10:50.000000000 +0100
@@ -92,7 +92,11 @@
{
struct zt_span *span;
struct ztdeth_header *zh;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+ zh = (struct ztdeth_header *)skb->network_header;
+#else
zh = (struct ztdeth_header *)skb->nh.raw;
+#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
span = ztdeth_getspan(eth_hdr(skb)->h_source, zh->subaddr);
#else
@@ -171,7 +175,11 @@
/* Setup protocol and such */
skb->protocol = __constant_htons(ETH_P_ZTDETH);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+ skb->network_header = skb->data;
+#else
skb->nh.raw = skb->data;
+#endif
skb->dev = dev;
if (dev->hard_header)
dev->hard_header(skb, dev, ETH_P_ZTDETH, addr, dev->dev_addr, skb->len);
|