From 8483173bff2589a2c1515f711bc0e337792f1995 Mon Sep 17 00:00:00 2001 From: Binbin Xu Date: Wed, 21 Sep 2016 03:54:05 +0800 Subject: ofproto: Remove groups that nested actions reference when removing rule. topology: +----------------+ +-------->| SDN Controller |<--------------+ | +----------------+ | | | +-----------|-----+ +-----------|-----+ | +-----+ | | | +-----+ | | | | VM1 | | | | | VM2 | | | | +-----+ | | | +-----+ | | | ^ V | | ^ V | | | +-----+ | | | +-----+ | | +-> | OVS | | | +-> | OVS | | | +-----+ | | +-----+ | | ^ | | ^ | +-----------|-----+ +-----------|-----+ | Nic Nic| +------------------------------------------+ We start the communication between VM1 and VM2, for example, ICMP. At the meantime, disconnect OVS and SDN controller, and reconnect them again, the process ovs-vswitchd crashes. backtrace: 0 0x00007f658082ffe4 in cls_rule_make_invisible_in_version () 1 0x00007f65807f6bb3 in delete_flows_start__ () 2 0x00007f65807f7ee9 in ofproto_group_mod_start () 3 0x00007f65807fa07b in handle_openflow () 4 0x00007f658082119b in connmgr_run () 5 0x00007f65807f3ba6 in ofproto_run () 6 0x00007f65807e101c in bridge_run__ () 7 0x00007f65807e715d in bridge_run () 8 0x00007f658065784d in main () Signed-off-by: Binbin Xu Signed-off-by: Ben Pfaff --- ofproto/ofproto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 ofproto/ofproto.c (limited to 'ofproto') diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c old mode 100644 new mode 100755 index 26848deeb..364cab233 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -8436,7 +8436,7 @@ ofproto_rule_remove__(struct ofproto *ofproto, struct rule *rule) if (actions->has_groups) { const struct ofpact_group *a; - OFPACT_FOR_EACH_TYPE (a, GROUP, actions->ofpacts, + OFPACT_FOR_EACH_TYPE_FLATTENED(a, GROUP, actions->ofpacts, actions->ofpacts_len) { struct ofgroup *group; -- cgit v1.2.1