[zaptel-commits] file: branch 1.4 r2676 - in /branches/1.4: ./ ztd-eth.c

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Mon Jul 2 10:58:24 CDT 2007


Author: file
Date: Mon Jul  2 10:58:23 2007
New Revision: 2676

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2676
Log:
Merged revisions 2675 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.2

........
r2675 | file | 2007-07-02 12:56:18 -0300 (Mon, 02 Jul 2007) | 2 lines

Add support for the 2.6.22 kernel. (issue #10095 reported by Matti)

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/ztd-eth.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/ztd-eth.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/ztd-eth.c?view=diff&rev=2676&r1=2675&r2=2676
==============================================================================
--- branches/1.4/ztd-eth.c (original)
+++ branches/1.4/ztd-eth.c Mon Jul  2 10:58:23 2007
@@ -94,7 +94,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(skb);
+#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
@@ -173,7 +177,11 @@
 
 			/* Setup protocol and such */
 			skb->protocol = __constant_htons(ETH_P_ZTDETH);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+			skb_set_network_header(skb, 0);
+#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);




More information about the zaptel-commits mailing list