Message ID | 20131002004057.GE5483@verge.net.au |
---|---|
State | Not Applicable, archived |
Delegated to: | David Miller |
Headers | show |
On Tue, Oct 1, 2013 at 5:40 PM, Simon Horman <horms@verge.net.au> wrote: > On Tue, Oct 01, 2013 at 04:02:17PM -0700, Jesse Gross wrote: >> On Mon, Sep 30, 2013 at 11:47 PM, Simon Horman <horms@verge.net.au> wrote: >> > @@ -545,6 +662,14 @@ static int do_execute_actions(struct datapath *dp, struct sk_buff *skb, >> > output_userspace(dp, skb, a); >> > break; >> > >> > + case OVS_ACTION_ATTR_PUSH_MPLS: >> > + err = push_mpls(skb, nla_data(a)); >> > + break; >> > + >> > + case OVS_ACTION_ATTR_POP_MPLS: >> > + err = pop_mpls(skb, nla_get_be16(a)); >> > + break; >> >> I think we need something similar to POP_VLAN here - in the event of >> an error the skb will have already been freed. > > Thanks, though I think you mean that PUSH_MPLS should be similar to > PUSH_VLAN. I don't think that either pop_mpls() or pop_vlan() free the > skb on error. Yes, sorry, that's what I meant. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/datapath/actions.c b/datapath/actions.c index bfab9ec..8babfc4 100644 --- a/datapath/actions.c +++ b/datapath/actions.c @@ -664,6 +664,8 @@ static int do_execute_actions(struct datapath *dp, struct sk_buff *skb, case OVS_ACTION_ATTR_PUSH_MPLS: err = push_mpls(skb, nla_data(a)); + if (unlikely(err)) /* skb already freed. */ + return err; break; case OVS_ACTION_ATTR_POP_MPLS: