Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 214799 Details for
Bug 284519
net-misc/cisco-vpnclient-3des-4.8.01.0640 failed (error: 'struct net_device' has no member named 'hard_start_xmit')
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch file
interceptor2.patch (text/plain), 2.97 KB, created by
Marshall Banana
on 2009-12-31 21:37:21 UTC
(
hide
)
Description:
patch file
Filename:
MIME Type:
Creator:
Marshall Banana
Created:
2009-12-31 21:37:21 UTC
Size:
2.97 KB
patch
obsolete
>*** interceptor.bak Thu Dec 17 12:13:32 2009 >--- interceptor.c Thu Dec 17 12:18:43 2009 >*************** >*** 134,139 **** >--- 134,148 ---- > .notifier_call = handle_netdev_event, > }; > >+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) >+ static const struct net_device_ops vnet_netdev_ops = { >+ .ndo_start_xmit = interceptor_tx, >+ .ndo_get_stats = interceptor_stats, >+ .ndo_do_ioctl = interceptor_ioctl, >+ }; >+ #endif >+ >+ > #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) > static > #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) >*************** >*** 146,156 **** >--- 155,180 ---- > #endif > interceptor_init(struct net_device *dev) > { >+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) >+ struct net_device_ops *ops_tmp; >+ #endif > ether_setup(dev); > >+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) >+ if (dev->netdev_ops) { >+ ops_tmp = (struct net_device_ops *) dev->netdev_ops; >+ ops_tmp->ndo_start_xmit = interceptor_tx; >+ ops_tmp->ndo_get_stats = interceptor_stats; >+ ops_tmp->ndo_do_ioctl = interceptor_ioctl; >+ dev->netdev_ops = ops_tmp; >+ } >+ else >+ { dev->netdev_ops = &vnet_netdev_ops; } >+ #else > dev->hard_start_xmit = interceptor_tx; > dev->get_stats = interceptor_stats; > dev->do_ioctl = interceptor_ioctl; >+ #endif > > dev->mtu = ETH_DATA_LEN-MTU_REDUCTION; > kernel_memcpy(dev->dev_addr, interceptor_eth_addr,ETH_ALEN); >*************** >*** 260,265 **** >--- 284,292 ---- > static int > add_netdev(struct net_device *dev) > { >+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) >+ struct net_device_ops *ops_tmp; >+ #endif > int rc = -1; > int i = 0; > >*************** >*** 288,295 **** >--- 315,329 ---- > Bindings[i].original_mtu = dev->mtu; > > /*replace the original send function with our send function */ >+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) >+ Bindings[i].InjectSend = dev->netdev_ops->ndo_start_xmit; >+ ops_tmp = (struct net_device_ops*)dev->netdev_ops; >+ ops_tmp->ndo_start_xmit = replacement_dev_xmit; >+ dev->netdev_ops = ops_tmp; >+ #else > Bindings[i].InjectSend = dev->hard_start_xmit; > dev->hard_start_xmit = replacement_dev_xmit; >+ #endif > > /*copy in the ip packet handler function and packet type struct */ > Bindings[i].InjectReceive = original_ip_handler.orig_handler_func; >*************** >*** 303,308 **** >--- 337,345 ---- > static int > remove_netdev(struct net_device *dev) > { >+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) >+ struct net_device_ops *ops_tmp; >+ #endif > int rc = -1; > BINDING *b; > >*************** >*** 311,317 **** >--- 348,360 ---- > if (b) > { > rc = 0; >+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) >+ ops_tmp = (struct net_device_ops*)dev->netdev_ops; >+ ops_tmp->ndo_start_xmit = b->InjectSend; >+ dev->netdev_ops = ops_tmp; >+ #else > dev->hard_start_xmit = b->InjectSend; >+ #endif > kernel_memset(b, 0, sizeof(BINDING)); > } > else
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 284519
:
214798
| 214799