diff --git a/elements/userlevel/rsshashswitch.cc b/elements/userlevel/rsshashswitch.cc index 61d3ac9de..8ce62e0e2 100644 --- a/elements/userlevel/rsshashswitch.cc +++ b/elements/userlevel/rsshashswitch.cc @@ -26,8 +26,10 @@ #include #include -#include -#include +#if HAVE_IP6 +# include +# include +#endif #include CLICK_DECLS @@ -79,7 +81,9 @@ RSSHashSwitch::process(Packet *p) memcpy(&tuple.v4.dst_addr, &a, 4); len = 4 + 4 + 2 + 2; - } else if (eth->ether_type == 0xDD86) { + } +#if HAVE_IP6 + else if (eth->ether_type == 0xDD86) { IP6FlowID f(p); tuple.v6.sport = f.sport(); tuple.v6.dport = f.dport(); @@ -88,7 +92,9 @@ RSSHashSwitch::process(Packet *p) a = f.daddr(); memcpy(&tuple.v6.dst_addr, &a, 16); len = 16 + 16 + 2 + 2; - } else { + } +#endif + else { return 0; } @@ -115,4 +121,4 @@ RSSHashSwitch::push_batch(int port, PacketBatch *batch) CLICK_ENDDECLS EXPORT_ELEMENT(RSSHashSwitch) ELEMENT_MT_SAFE(RSSHashSwitch) -ELEMENT_REQUIRES(dpdk) \ No newline at end of file +ELEMENT_REQUIRES(dpdk)