Hi,

I am working on a testbench for our wireless product, and now I have
to test traffic on
different VLANs.

However:

ARPResponder does not make the responses with the VLAN annotation of
the request,
so if anyone asks for my address on VLAN 5, I will answer on VLAN 0 (no VLAN)

The same is the case with ARPRequester where the request does not have the same
VLAN annotation as the packet that caused the request.

I have been using Cliff Freys VLAN elements, and I suggest that they
find their way to
release 2 as well.


Like this:

out::Queue ->
VLANEncap(20) ->
ToDevice(eth1);

input -> arpq::ARPQuerier(eth1)  -> out;

FromDevice(eth0) -> VLANDecap(20) -> arp::Classifier(12/0806 20/0001,
12/0806 20/0002, 12/0800);

arp[0] -> ARPResponder(eth1, 10.20.30.40) -> out;
arp[1] -> [1]arpq;

arp[2] -> output;


I have made a patch for ARPResponder and ARPQuerier.


yours,
Lars Bro
*** elements/ethernet/arpquerier.cc.old	Wed Jul  6 08:21:57 2011
--- elements/ethernet/arpquerier.cc	Wed Jul  6 08:22:38 2011
***************
*** 28,33 ****
--- 28,34 ----
  #include <click/router.hh>
  #include <click/error.hh>
  #include <click/glue.hh>
+ #include <click/packet_anno.hh>
  CLICK_DECLS
  
  ARPQuerier::ARPQuerier()
*************** ARPQuerier::send_query_for(const Packet
*** 210,215 ****
--- 211,219 ----
  	return;
      }
  
+     // If the packet has a VLAN annotation, send the query to thet VLAN
+     SET_VLAN_ANNO(q, VLAN_ANNO(p));
+ 
      click_ether *e = (click_ether *) q->data();
      q->set_ether_header(e);
      if (ether_dhost_valid && likely(!_broadcast_poll))
*** elements/ethernet/arpresponder.cc.old	Wed Jul  6 08:22:07 2011
--- elements/ethernet/arpresponder.cc	Wed Jul  6 08:22:38 2011
***************
*** 25,30 ****
--- 25,31 ----
  #include <click/error.hh>
  #include <click/glue.hh>
  #include <click/straccum.hh>
+ #include <click/packet_anno.hh>
  CLICK_DECLS
  
  ARPResponder::ARPResponder()
*************** ARPResponder::make_response(const uint8_
*** 152,157 ****
--- 153,162 ----
      if (p)
  	q->set_device_anno(p->device_anno());
  
+     // The response gets the same VLAN annotation as the request
+     if(p)
+       SET_VLAN_ANNO(q, VLAN_ANNO(p));
+ 
      click_ether *e = (click_ether *) q->data();
      q->set_ether_header(e);
      memcpy(e->ether_dhost, target_eth, 6);
_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click

Reply via email to