diff options
author | Thadeu Lima de Souza Cascardo <cascardo@redhat.com> | 2016-02-17 12:43:56 -0200 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2016-02-23 08:34:53 -0800 |
commit | f7c5f6aa47338ec48517bb175336ad63c4ac56a5 (patch) | |
tree | 84be2999b42aaea491f400dfea2bdce85a0f7553 /ofproto/ofproto-dpif-xlate.c | |
parent | cfc6963c960f55151fa80784b4d4fd45c4195758 (diff) | |
download | openvswitch-f7c5f6aa47338ec48517bb175336ad63c4ac56a5.tar.gz |
ofproto-dpif-xlate: Fix crash when using multicast snooping.
The revalidator thread may set may_learn and call xlate_actions with no packet
data. If the revalidated flow is IGMPv3 or MLD, vswitchd will crash when trying
to access the NULL packet.
Only process IGMP and MLD flows when there is a packet. This is a similar
behavior than what we have for other special packets.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Reported-by: Yi Ba <yby.developer@yahoo.com>
Reported-at: http://openvswitch.org/pipermail/discuss/2016-January/020023.html
Fixes: 06994f879c9d ("mcast-snooping: Add Multicast Listener Discovery support")
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/ofproto-dpif-xlate.c')
-rw-r--r-- | ofproto/ofproto-dpif-xlate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 3dd4ae2a4..c1e98345f 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -2451,7 +2451,7 @@ xlate_normal(struct xlate_ctx *ctx) if (is_igmp(flow)) { if (mcast_snooping_is_membership(flow->tp_src) || mcast_snooping_is_query(flow->tp_src)) { - if (ctx->xin->may_learn) { + if (ctx->xin->may_learn && ctx->xin->packet) { update_mcast_snooping_table(ctx->xbridge, flow, vlan, in_xbundle, ctx->xin->packet); } @@ -2483,7 +2483,7 @@ xlate_normal(struct xlate_ctx *ctx) return; } else if (is_mld(flow)) { ctx->xout->slow |= SLOW_ACTION; - if (ctx->xin->may_learn) { + if (ctx->xin->may_learn && ctx->xin->packet) { update_mcast_snooping_table(ctx->xbridge, flow, vlan, in_xbundle, ctx->xin->packet); } |