X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Factions.c;h=de98d990c2dff6f79ade48695983a8324e0ff321;hb=9cb8877cf7d1d86101a8f27829ad47ea0c8b1fe5;hp=b6b713534565bc6961c514a324df56dfebb0990d;hpb=007948177581f3b3dad188221593d0e4bdca6ba0;p=openvswitch diff --git a/datapath/actions.c b/datapath/actions.c index b6b71353..de98d990 100644 --- a/datapath/actions.c +++ b/datapath/actions.c @@ -114,13 +114,13 @@ static struct sk_buff *modify_vlan_tci(struct sk_buff *skb, __be16 tci) static bool is_ip(struct sk_buff *skb) { - return (OVS_CB(skb)->flow->key.dl_type == htons(ETH_P_IP) && + return (OVS_CB(skb)->flow->key.eth.type == htons(ETH_P_IP) && skb->transport_header > skb->network_header); } static __sum16 *get_l4_checksum(struct sk_buff *skb) { - u8 nw_proto = OVS_CB(skb)->flow->key.nw_proto; + u8 nw_proto = OVS_CB(skb)->flow->key.ip.proto; int transport_len = skb->len - skb_transport_offset(skb); if (nw_proto == IPPROTO_TCP) { if (likely(transport_len >= sizeof(struct tcphdr))) @@ -230,7 +230,7 @@ static bool is_spoofed_arp(struct sk_buff *skb) { struct arp_eth_header *arp; - if (OVS_CB(skb)->flow->key.dl_type != htons(ETH_P_ARP)) + if (OVS_CB(skb)->flow->key.eth.type != htons(ETH_P_ARP)) return false; if (skb_network_offset(skb) + sizeof(struct arp_eth_header) > skb->len)