X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Fflow.c;h=f01071c61b6f4f1cc7e85ab201777ed30d7cb4e0;hb=d9fce1ca2313d608ff7c92b69b3ec54661ab16b0;hp=f769b14d6abc9244d2a6a75d3cd4e545a980f7ec;hpb=50f06e1642e246bb9969035c9e3db7c44e7b95e0;p=openvswitch diff --git a/datapath/flow.c b/datapath/flow.c index f769b14d..f01071c6 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -234,7 +234,7 @@ int flow_extract(struct sk_buff *skb, u16 in_port, struct odp_flow_key *key) if (skb->len < sizeof *eth) return 0; - if (!pskb_may_pull(skb, skb->len >= 64 ? 64 : skb->len)) + if (!pskb_may_pull(skb, min(skb->len, 64u))) return 0; skb_reset_mac_header(skb);