diff options
Diffstat (limited to 'net/openvswitch/datapath.c')
-rw-r--r-- | net/openvswitch/datapath.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index fa8760176b7d..1402f1be642d 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c | |||
@@ -560,7 +560,6 @@ static int ovs_packet_cmd_execute(struct sk_buff *skb, struct genl_info *info) | |||
560 | struct sw_flow *flow; | 560 | struct sw_flow *flow; |
561 | struct sw_flow_actions *sf_acts; | 561 | struct sw_flow_actions *sf_acts; |
562 | struct datapath *dp; | 562 | struct datapath *dp; |
563 | struct ethhdr *eth; | ||
564 | struct vport *input_vport; | 563 | struct vport *input_vport; |
565 | u16 mru = 0; | 564 | u16 mru = 0; |
566 | int len; | 565 | int len; |
@@ -581,17 +580,6 @@ static int ovs_packet_cmd_execute(struct sk_buff *skb, struct genl_info *info) | |||
581 | 580 | ||
582 | nla_memcpy(__skb_put(packet, len), a[OVS_PACKET_ATTR_PACKET], len); | 581 | nla_memcpy(__skb_put(packet, len), a[OVS_PACKET_ATTR_PACKET], len); |
583 | 582 | ||
584 | skb_reset_mac_header(packet); | ||
585 | eth = eth_hdr(packet); | ||
586 | |||
587 | /* Normally, setting the skb 'protocol' field would be handled by a | ||
588 | * call to eth_type_trans(), but it assumes there's a sending | ||
589 | * device, which we may not have. */ | ||
590 | if (eth_proto_is_802_3(eth->h_proto)) | ||
591 | packet->protocol = eth->h_proto; | ||
592 | else | ||
593 | packet->protocol = htons(ETH_P_802_2); | ||
594 | |||
595 | /* Set packet's mru */ | 583 | /* Set packet's mru */ |
596 | if (a[OVS_PACKET_ATTR_MRU]) { | 584 | if (a[OVS_PACKET_ATTR_MRU]) { |
597 | mru = nla_get_u16(a[OVS_PACKET_ATTR_MRU]); | 585 | mru = nla_get_u16(a[OVS_PACKET_ATTR_MRU]); |
@@ -618,6 +606,7 @@ static int ovs_packet_cmd_execute(struct sk_buff *skb, struct genl_info *info) | |||
618 | rcu_assign_pointer(flow->sf_acts, acts); | 606 | rcu_assign_pointer(flow->sf_acts, acts); |
619 | packet->priority = flow->key.phy.priority; | 607 | packet->priority = flow->key.phy.priority; |
620 | packet->mark = flow->key.phy.skb_mark; | 608 | packet->mark = flow->key.phy.skb_mark; |
609 | packet->protocol = flow->key.eth.type; | ||
621 | 610 | ||
622 | rcu_read_lock(); | 611 | rcu_read_lock(); |
623 | dp = get_dp_rcu(net, ovs_header->dp_ifindex); | 612 | dp = get_dp_rcu(net, ovs_header->dp_ifindex); |