Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch

Two small openswitch fixes from Jesse Gross.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2012-11-28 18:00:47 -05:00
commit a45085f6a7
2 changed files with 6 additions and 10 deletions

View File

@ -702,15 +702,11 @@ int ovs_flow_extract(struct sk_buff *skb, u16 in_port, struct sw_flow_key *key,
/* We only match on the lower 8 bits of the opcode. */ /* We only match on the lower 8 bits of the opcode. */
if (ntohs(arp->ar_op) <= 0xff) if (ntohs(arp->ar_op) <= 0xff)
key->ip.proto = ntohs(arp->ar_op); key->ip.proto = ntohs(arp->ar_op);
memcpy(&key->ipv4.addr.src, arp->ar_sip, sizeof(key->ipv4.addr.src));
if (key->ip.proto == ARPOP_REQUEST memcpy(&key->ipv4.addr.dst, arp->ar_tip, sizeof(key->ipv4.addr.dst));
|| key->ip.proto == ARPOP_REPLY) { memcpy(key->ipv4.arp.sha, arp->ar_sha, ETH_ALEN);
memcpy(&key->ipv4.addr.src, arp->ar_sip, sizeof(key->ipv4.addr.src)); memcpy(key->ipv4.arp.tha, arp->ar_tha, ETH_ALEN);
memcpy(&key->ipv4.addr.dst, arp->ar_tip, sizeof(key->ipv4.addr.dst)); key_len = SW_FLOW_KEY_OFFSET(ipv4.arp);
memcpy(key->ipv4.arp.sha, arp->ar_sha, ETH_ALEN);
memcpy(key->ipv4.arp.tha, arp->ar_tha, ETH_ALEN);
key_len = SW_FLOW_KEY_OFFSET(ipv4.arp);
}
} }
} else if (key->eth.type == htons(ETH_P_IPV6)) { } else if (key->eth.type == htons(ETH_P_IPV6)) {
int nh_len; /* IPv6 Header + Extensions */ int nh_len; /* IPv6 Header + Extensions */

View File

@ -158,7 +158,7 @@ static int netdev_send(struct vport *vport, struct sk_buff *skb)
if (unlikely(packet_length(skb) > mtu && !skb_is_gso(skb))) { if (unlikely(packet_length(skb) > mtu && !skb_is_gso(skb))) {
net_warn_ratelimited("%s: dropped over-mtu packet: %d > %d\n", net_warn_ratelimited("%s: dropped over-mtu packet: %d > %d\n",
ovs_dp_name(vport->dp), netdev_vport->dev->name,
packet_length(skb), mtu); packet_length(skb), mtu);
goto error; goto error;
} }