X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=datapath%2Factions.c;h=f7e51d925152d09a17bd0d92b10079c37e3fa5e4;hb=4e312e694f1e9e34ed0aad7d5778b73d7add270d;hp=ff67372a0ce13cc43d8068947b04da57bcdf3e93;hpb=c1c9c9c4b636ab2acf2f75024c282a9a497ca9a9;p=openvswitch diff --git a/datapath/actions.c b/datapath/actions.c index ff67372a..f7e51d92 100644 --- a/datapath/actions.c +++ b/datapath/actions.c @@ -113,6 +113,8 @@ modify_vlan_tci(struct datapath *dp, struct sk_buff *skb, ~skb->csum); } } else { + int err; + /* Add vlan header */ /* Set up checksumming pointers for checksum-deferred packets @@ -120,7 +122,11 @@ modify_vlan_tci(struct datapath *dp, struct sk_buff *skb, * when we send the packet out on the wire, and it will fail at * that point because skb_checksum_setup() will not look inside * an 802.1Q header. */ - vswitch_skb_checksum_setup(skb); + err = vswitch_skb_checksum_setup(skb); + if (unlikely(err)) { + kfree_skb(skb); + return ERR_PTR(err); + } /* GSO is not implemented for packets with an 802.1Q header, so * we have to do segmentation before we add that header.