dstlimit filter on stock 2.4.22

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been messing with the patch-o-matic/base/dstlimit.patch filter from CVS. 
It uses constructs from 2.6 that do not exist in 2.4. For example, 
list_for_each_entry_safe() and PDE() are not defined. Its easy enough to hack 
them into the code:

#ifndef list_for_each_entry_safe
#define list_for_each_entry_safe(pos, n, head, member)                  \
        for (pos = list_entry((head)->next, typeof(*pos), member),      \
                n = list_entry(pos->member.next, typeof(*pos), member); \
             &pos->member != (head);                                    \
             pos = n, n = list_entry(n->member.next, typeof(*n), member))
#endif
#if LINUX_VERSION_CODE < 0x020500
static inline struct proc_dir_entry *PDE(const struct inode *inode)
{
        return inode->u.generic_ip;
}
#endif

But is this the right way?
-- 
Tim Gardner - timg@tpi.com
www.tpi.com 406-443-5357
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux