summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrussell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-10-14 22:30:55 +0000
committerrussell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-10-14 22:30:55 +0000
commite1237a57e94aa5fec97eff0a4bfc7419cb73cc49 (patch)
tree3f8a632f0c6f1b4e63c79c05466b73350adb43fa
parentdae18ae84133b7d91bb2f48b1da49d219c281aa6 (diff)
fix build for 2.6.9 kernel (bug #2636)
git-svn-id: http://svn.digium.com/svn/zaptel/branches/v1-0@472 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-xztd-eth.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ztd-eth.c b/ztd-eth.c
index 4975d0c..62e4382 100755
--- a/ztd-eth.c
+++ b/ztd-eth.c
@@ -86,7 +86,11 @@ static int ztdeth_rcv(struct sk_buff *skb, struct net_device *dev, struct packet
struct zt_span *span;
struct ztdeth_header *zh;
zh = (struct ztdeth_header *)skb->nh.raw;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
+ span = ztdeth_getspan(eth_hdr(skb)->h_source, zh->subaddr);
+#else
span = ztdeth_getspan(skb->mac.ethernet->h_source, zh->subaddr);
+#endif
if (span) {
skb_pull(skb, sizeof(struct ztdeth_header));
zt_dynamic_receive(span, (unsigned char *)skb->data, skb->len);