ovs-controller: Avoid dereferencing NULL pointer when the switch acts as a hub
authorZhengLingyun <konghuarukhr@163.com>
Tue, 8 Oct 2013 15:52:40 +0000 (23:52 +0800)
committerBen Pfaff <blp@nicira.com>
Tue, 8 Oct 2013 16:57:03 +0000 (09:57 -0700)
commitcbd577d661d99d37785d847ba8f15e5f4b58db87
tree8efa1f734158b63a8fe9c74358d9d13eb0e8de42
parenta34779bcbe9a4fd568bdcd414ee0416c208dbf22
ovs-controller: Avoid dereferencing NULL pointer when the switch acts as a hub

Starting ovs-controller with '-H' option will lead to a segment fault problem.
Add a check, and adjust the indentation of the following code.

Signed-off-by: ZhengLingyun <konghuarukhr@163.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/learning-switch.c