Following commit fixes compatibility by fixing header includes, using correct apis, etc.
Reported-by: Palo Andi <[email protected]> Signed-off-by: Pravin B Shelar <[email protected]> --- This patch compiles with kernel 2.6.18. --- datapath/tunnel.c | 3 +++ datapath/vport-internal_dev.c | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/datapath/tunnel.c b/datapath/tunnel.c index 83d2c41..dbe4ebc 100644 --- a/datapath/tunnel.c +++ b/datapath/tunnel.c @@ -27,6 +27,7 @@ #include <linux/version.h> #include <linux/workqueue.h> #include <linux/rculist.h> +#include <net/ip.h> #include <net/route.h> #include <net/xfrm.h> @@ -203,6 +204,7 @@ error: return ERR_PTR(err); } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) /* Compute source UDP port for outgoing packet. * Currently we use the flow hash. */ @@ -217,6 +219,7 @@ u16 ovs_tnl_get_src_port(struct sk_buff *skb) range = (high - low) + 1; return (((u64) hash * range) >> 32) + low; } +#endif int ovs_tnl_send(struct vport *vport, struct sk_buff *skb) { diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c index a5f2d75..521dadc 100644 --- a/datapath/vport-internal_dev.c +++ b/datapath/vport-internal_dev.c @@ -174,7 +174,7 @@ static void do_setup(struct net_device *netdev) netdev->hard_start_xmit = internal_dev_xmit; netdev->open = internal_dev_open; netdev->stop = internal_dev_stop; - netdev->set_mac_address = internal_dev_mac_addr; + netdev->set_mac_address = eth_mac_addr; netdev->change_mtu = internal_dev_change_mtu; #endif -- 1.7.1 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
