[zaptel-commits] file: trunk r2677 - in /trunk: ./ ztd-eth.c

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


Author: file
Date: Mon Jul  2 10:59:30 2007
New Revision: 2677

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

................
r2676 | file | 2007-07-02 12:58:23 -0300 (Mon, 02 Jul 2007) | 10 lines

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:
    trunk/   (props changed)
    trunk/ztd-eth.c

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

Modified: trunk/ztd-eth.c
URL: http://svn.digium.com/view/zaptel/trunk/ztd-eth.c?view=diff&rev=2677&r1=2676&r2=2677
==============================================================================
--- trunk/ztd-eth.c (original)
+++ trunk/ztd-eth.c Mon Jul  2 10:59:30 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