Author: marek Date: 2010-01-23 09:58:22 +0100 (Sat, 23 Jan 2010) New Revision: 1563
Modified: trunk/batman-adv-kernelland/compat.h trunk/batman-adv-kernelland/gateway_client.c trunk/batman-adv-kernelland/gateway_common.c Log: batman-adv: make IPPROTO_UDP available on older kernels
Some older kernels don't support the IPPROTO_UDP define, therefore it is necessary to make it available in the compat.h
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
Modified: trunk/batman-adv-kernelland/compat.h =================================================================== --- trunk/batman-adv-kernelland/compat.h 2010-01-23 08:08:03 UTC (rev 1562) +++ trunk/batman-adv-kernelland/compat.h 2010-01-23 08:58:22 UTC (rev 1563) @@ -24,6 +24,10 @@
#include <linux/version.h> /* LINUX_VERSION_CODE */
+#ifndef IPPROTO_UDP +#define IPPROTO_UDP 17 +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
#define skb_set_network_header(_skb, _offset) \
Modified: trunk/batman-adv-kernelland/gateway_client.c =================================================================== --- trunk/batman-adv-kernelland/gateway_client.c 2010-01-23 08:08:03 UTC (rev 1562) +++ trunk/batman-adv-kernelland/gateway_client.c 2010-01-23 08:58:22 UTC (rev 1563) @@ -20,6 +20,7 @@ #include "main.h" #include "gateway_client.h" #include "gateway_common.h" +#include "compat.h" #include <linux/ip.h> #include <linux/udp.h> #include <linux/if_vlan.h>
Modified: trunk/batman-adv-kernelland/gateway_common.c =================================================================== --- trunk/batman-adv-kernelland/gateway_common.c 2010-01-23 08:08:03 UTC (rev 1562) +++ trunk/batman-adv-kernelland/gateway_common.c 2010-01-23 08:58:22 UTC (rev 1563) @@ -20,6 +20,7 @@ #include "main.h" #include "gateway_common.h" #include "gateway_client.h" +#include "compat.h"
atomic_t gw_mode; atomic_t gw_srv_class;