diff options
author | Tom Herbert <therbert@google.com> | 2014-07-02 00:32:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-08 00:14:21 -0400 |
commit | 535fb8d006bc6a96d59558181a9a6f267be382c5 (patch) | |
tree | 044ec047776bdbc14bdcf93ae2b9068d349bdeef /net/openvswitch | |
parent | b8f1a55639e6a76cfd274cc7de76eafac9a15ca9 (diff) |
vxlan: Call udp_flow_src_port
In vxlan and OVS vport-vxlan call common function to get source port
for a UDP tunnel. Removed vxlan_src_port since the functionality is
now in udp_flow_src_port.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch')
-rw-r--r-- | net/openvswitch/vport-vxlan.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/openvswitch/vport-vxlan.c b/net/openvswitch/vport-vxlan.c index 0edbd95c60e7..d8b7e247bebf 100644 --- a/net/openvswitch/vport-vxlan.c +++ b/net/openvswitch/vport-vxlan.c | |||
@@ -143,8 +143,6 @@ static int vxlan_tnl_send(struct vport *vport, struct sk_buff *skb) | |||
143 | struct rtable *rt; | 143 | struct rtable *rt; |
144 | struct flowi4 fl; | 144 | struct flowi4 fl; |
145 | __be16 src_port; | 145 | __be16 src_port; |
146 | int port_min; | ||
147 | int port_max; | ||
148 | __be16 df; | 146 | __be16 df; |
149 | int err; | 147 | int err; |
150 | 148 | ||
@@ -172,8 +170,7 @@ static int vxlan_tnl_send(struct vport *vport, struct sk_buff *skb) | |||
172 | 170 | ||
173 | skb->ignore_df = 1; | 171 | skb->ignore_df = 1; |
174 | 172 | ||
175 | inet_get_local_port_range(net, &port_min, &port_max); | 173 | src_port = udp_flow_src_port(net, skb, 0, 0, true); |
176 | src_port = vxlan_src_port(port_min, port_max, skb); | ||
177 | 174 | ||
178 | err = vxlan_xmit_skb(vxlan_port->vs, rt, skb, | 175 | err = vxlan_xmit_skb(vxlan_port->vs, rt, skb, |
179 | fl.saddr, OVS_CB(skb)->tun_key->ipv4_dst, | 176 | fl.saddr, OVS_CB(skb)->tun_key->ipv4_dst, |