secchan: Fix segfault due to access-after-free in expiration.
authorBen Pfaff <blp@nicira.com>
Wed, 4 Mar 2009 23:08:57 +0000 (15:08 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 4 Mar 2009 23:08:57 +0000 (15:08 -0800)
commitbc2658d4c9fbd7dd1bf4903ef7c5153c867c83b8
tree75b0a5f443bf92747ef318252ab3d221a1954d00
parente6e60c552d66042bfb3ac200730f92d5be67f767
secchan: Fix segfault due to access-after-free in expiration.

classifier_for_each() keeps a pointer to the *next* rule to be visited, so
that the rule currently be visited can be deleted.  That means that if
the callback frees the next rule to be visited, then we get an
access-after-free error.

In particular, this was occurring when expire_rule() expired a superflow
whose
lib/classifier.c
lib/classifier.h
secchan/ofproto.c
tests/test-classifier.c