ofproto-dpif-xlate: Fix a bug.
authorAlex Wang <alexw@nicira.com>
Thu, 22 May 2014 03:45:24 +0000 (20:45 -0700)
committerAlex Wang <alexw@nicira.com>
Thu, 22 May 2014 03:49:07 +0000 (20:49 -0700)
commitc943a3ea752ffe39cfbd34783bb123b1e860c356
tree3679a755d73e1a6700a8e7940434e6dd82d78c9e
parent9a4df9a799e11bcff8e4d3c573f3db80a622e58b
ofproto-dpif-xlate: Fix a bug.

Commit b256dc525c8 (ofproto-dpif-xlate: Cache xlate_actions() effects.)
caches the variables needed for refreshing mac-learning table in
xlate_normal().  Wherein, the cache entry always records reference to
the original 'ofproto'.

When patch port is used to connect two 'ofproto's, packet goes through the
patch port will have two mac-learning cache entries created for each
'ofproto'.  So, each entry should reference to the corresponding 'ofproto'.
However, due to the bug mentioned above, all cache entries will refer to the
same 'ofproto'.  Subsequently, the mac-learning tables can be corrupted, which
causes connection loss.

This commit fixes the bug by making each cache entry refer to the correct
'ofproto'.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
ofproto/ofproto-dpif-xlate.c