ovs agent, native ARP response: set Eth src/dst

This change adds action to install_arp_responder of native implementation
so that the source and destination MAC addresses of the Ethernet header
are properly set, and now consistent with the ovs-ofctl implementation.

Change-Id: I9a095add42ba5799bd81887f1cbe5507ab9ba48c
Closes-Bug: 1623849
This commit is contained in:
Thomas Morin 2016-09-15 11:25:47 +02:00
parent 27928c0ddf
commit 7d2721de1a
2 changed files with 8 additions and 0 deletions

View File

@ -229,6 +229,10 @@ class OVSTunnelBridge(ovs_bridge.OVSAgentBridge,
n_bits=32),
ofpp.OFPActionSetField(arp_sha=mac),
ofpp.OFPActionSetField(arp_spa=ip),
ofpp.NXActionRegMove(src_field='eth_src',
dst_field='eth_dst',
n_bits=48),
ofpp.OFPActionSetField(eth_src_nxm=mac),
ofpp.OFPActionOutput(ofp.OFPP_IN_PORT, 0)]
self.install_apply_actions(table_id=constants.ARP_RESPONDER,
priority=1,

View File

@ -402,6 +402,10 @@ class OVSTunnelBridgeTest(ovs_bridge_test_base.OVSBridgeTestBase,
src_field='arp_spa'),
ofpp.OFPActionSetField(arp_sha=mac),
ofpp.OFPActionSetField(arp_spa=ip),
ofpp.NXActionRegMove(src_field='eth_src',
dst_field='eth_dst',
n_bits=48),
ofpp.OFPActionSetField(eth_src_nxm=mac),
ofpp.OFPActionOutput(ofp.OFPP_IN_PORT, 0),
]),
],