*/
/*
- * $Id: bsd_compat.c 5813 2010-03-22 18:05:13Z svn_magno $
+ * $Id: bsd_compat.c 6320 2010-05-24 11:54:36Z svn_panicucci $
*
* kernel variables and functions that are not available in linux.
*/
int bootverbose = 0;
struct timeval boottime;
-int ip_defttl;
+int ip_defttl = 64; /* XXX set default value */
+int max_linkhdr = 16;
int fw_one_pass = 1;
u_long in_ifaddrhmask; /* mask for hash table */
struct in_ifaddrhashhead *in_ifaddrhashtbl; /* inet addr hash table */
return 1; /* no match */
}
+
+/*
+ * linux 2.6.33 defines these functions to access to
+ * skbuff internal structures. Define the missing
+ * function for the previous versions too.
+ */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
+inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)
+{
+ skb->dst = dst;
+}
+
+inline struct dst_entry *skb_dst(const struct sk_buff *skb)
+{
+ return (struct dst_entry *)skb->dst;
+}
+#endif
+
+
/* support for sysctl emulation.
* XXX this is actually MI code that should be enabled also on openwrt
*/