Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 369789
b: refs/heads/master
c: 7d836a7
h: refs/heads/master
i:
  369787: 1f4a9bb
v: v3
  • Loading branch information
stephen hemminger authored and David S. Miller committed Apr 29, 2013
1 parent 00ebecd commit fb24bb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d174dd80ce94b7ed0950e31fc9a0122c689523b
refs/heads/master: 7d836a7679a85f75bbc96d631b4007a78396b190
9 changes: 4 additions & 5 deletions trunk/drivers/net/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ static void vxlan_set_owner(struct net_device *dev, struct sk_buff *skb)
* better and maybe available from hardware
* secondary choice is to use jhash on the Ethernet header
*/
static u16 vxlan_src_port(const struct vxlan_dev *vxlan, struct sk_buff *skb)
static __be16 vxlan_src_port(const struct vxlan_dev *vxlan, struct sk_buff *skb)
{
unsigned int range = (vxlan->port_max - vxlan->port_min) + 1;
u32 hash;
Expand All @@ -906,7 +906,7 @@ static u16 vxlan_src_port(const struct vxlan_dev *vxlan, struct sk_buff *skb)
hash = jhash(skb->data, 2 * ETH_ALEN,
(__force u32) skb->protocol);

return (((u64) hash * range) >> 32) + vxlan->port_min;
return htons((((u64) hash * range) >> 32) + vxlan->port_min);
}

static int handle_offloads(struct sk_buff *skb)
Expand Down Expand Up @@ -965,8 +965,7 @@ static netdev_tx_t vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
struct udphdr *uh;
struct flowi4 fl4;
__be32 dst;
__u16 src_port;
__be16 dst_port;
__be16 src_port, dst_port;
u32 vni;
__be16 df = 0;
__u8 tos, ttl;
Expand Down Expand Up @@ -1053,7 +1052,7 @@ static netdev_tx_t vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
uh = udp_hdr(skb);

uh->dest = dst_port;
uh->source = htons(src_port);
uh->source = src_port;

uh->len = htons(skb->len);
uh->check = 0;
Expand Down

0 comments on commit fb24bb8

Please sign in to comment.