[zaptel-commits] file: branch 1.2 r2675 - /branches/1.2/ztd-eth.c
SVN commits to the Zaptel project
zaptel-commits at lists.digium.com
Mon Jul 2 10:56:20 CDT 2007
Author: file
Date: Mon Jul 2 10:56:18 2007
New Revision: 2675
URL: http://svn.digium.com/view/zaptel?view=rev&rev=2675
Log:
Add support for the 2.6.22 kernel. (issue #10095 reported by Matti)
Modified:
branches/1.2/ztd-eth.c
Modified: branches/1.2/ztd-eth.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/ztd-eth.c?view=diff&rev=2675&r1=2674&r2=2675
==============================================================================
--- branches/1.2/ztd-eth.c (original)
+++ branches/1.2/ztd-eth.c Mon Jul 2 10:56:18 2007
@@ -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(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
@@ -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_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