Skip to content

Commit

Permalink
ofproto-dpif-sflow: Tolerate unknown datapath input port for tunnel.
Browse files Browse the repository at this point in the history
This patch avoids a segfault.

Submitted-at: openvswitch#152
Reported-at: http://openvswitch.org/pipermail/discuss/2016-August/022513.html
Reported-by: 张东亚 <[email protected]>
Fixes: 7321bda ("Extend sFlow agent to report tunnel and MPLS structures")
Signed-off-by: Neil McKee <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
sflow authored and blp committed Sep 2, 2016
1 parent 4a1cdbc commit 1898b54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ rahim entezari [email protected]
weizj [email protected]
俊 赵 [email protected]
冯全树(Crab) [email protected]
张东亚 [email protected]
胡靖飞 [email protected]
张伟 [email protected]
张强 [email protected]
Expand Down
2 changes: 1 addition & 1 deletion ofproto/ofproto-dpif-sflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ dpif_sflow_received(struct dpif_sflow *ds, const struct dp_packet *packet,
if (flow->tunnel.ip_dst) {
memset(&tnlInElem, 0, sizeof(tnlInElem));
tnlInElem.tag = SFLFLOW_EX_IPV4_TUNNEL_INGRESS;
tnlInProto = dpif_sflow_tunnel_proto(in_dsp->tunnel_type);
tnlInProto = in_dsp ? dpif_sflow_tunnel_proto(in_dsp->tunnel_type) : 0;
dpif_sflow_tunnel_v4(tnlInProto,
&flow->tunnel,
&tnlInElem.flowType.ipv4);
Expand Down

0 comments on commit 1898b54

Please sign in to comment.