X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fmatch.c;h=bedb1a1d280229ca409fd84ebd04ca1dacaa8f05;hb=48cecbdc39ccf29e7ea98a348cd2f4664272500b;hp=f1bf63c3fcba3ff5974d8e86ab2562ba71e2ea34;hpb=add90f6f205a65c2569bb240683c0a70cc249c6b;p=sliver-openvswitch.git diff --git a/lib/match.c b/lib/match.c index f1bf63c3f..bedb1a1d2 100644 --- a/lib/match.c +++ b/lib/match.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, 2011, 2012 Nicira, Inc. + * Copyright (c) 2009, 2010, 2011, 2012, 2013 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -106,8 +106,7 @@ match_wc_init(struct match *match, const struct flow *flow) memset(&wc->masks.arp_tha, 0xff, sizeof wc->masks.arp_tha); } - if (flow->dl_type == htons(ETH_TYPE_IPV6) || - flow->dl_type == htons(ETH_TYPE_IP)) { + if (is_ip_any(flow)) { memset(&wc->masks.nw_tos, 0xff, sizeof wc->masks.nw_tos); memset(&wc->masks.nw_ttl, 0xff, sizeof wc->masks.nw_ttl); }