diff options
Diffstat (limited to 'net/ipv4/ipip.c')
-rw-r--r-- | net/ipv4/ipip.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 40403114f00a..915d215a7d14 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c | |||
@@ -366,12 +366,12 @@ static bool ipip_netlink_encap_parms(struct nlattr *data[], | |||
366 | 366 | ||
367 | if (data[IFLA_IPTUN_ENCAP_SPORT]) { | 367 | if (data[IFLA_IPTUN_ENCAP_SPORT]) { |
368 | ret = true; | 368 | ret = true; |
369 | ipencap->sport = nla_get_u16(data[IFLA_IPTUN_ENCAP_SPORT]); | 369 | ipencap->sport = nla_get_be16(data[IFLA_IPTUN_ENCAP_SPORT]); |
370 | } | 370 | } |
371 | 371 | ||
372 | if (data[IFLA_IPTUN_ENCAP_DPORT]) { | 372 | if (data[IFLA_IPTUN_ENCAP_DPORT]) { |
373 | ret = true; | 373 | ret = true; |
374 | ipencap->dport = nla_get_u16(data[IFLA_IPTUN_ENCAP_DPORT]); | 374 | ipencap->dport = nla_get_be16(data[IFLA_IPTUN_ENCAP_DPORT]); |
375 | } | 375 | } |
376 | 376 | ||
377 | return ret; | 377 | return ret; |
@@ -460,10 +460,10 @@ static int ipip_fill_info(struct sk_buff *skb, const struct net_device *dev) | |||
460 | 460 | ||
461 | if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, | 461 | if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, |
462 | tunnel->encap.type) || | 462 | tunnel->encap.type) || |
463 | nla_put_u16(skb, IFLA_IPTUN_ENCAP_SPORT, | 463 | nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, |
464 | tunnel->encap.sport) || | 464 | tunnel->encap.sport) || |
465 | nla_put_u16(skb, IFLA_IPTUN_ENCAP_DPORT, | 465 | nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, |
466 | tunnel->encap.dport) || | 466 | tunnel->encap.dport) || |
467 | nla_put_u16(skb, IFLA_IPTUN_ENCAP_FLAGS, | 467 | nla_put_u16(skb, IFLA_IPTUN_ENCAP_FLAGS, |
468 | tunnel->encap.flags)) | 468 | tunnel->encap.flags)) |
469 | goto nla_put_failure; | 469 | goto nla_put_failure; |
@@ -498,6 +498,7 @@ static struct rtnl_link_ops ipip_link_ops __read_mostly = { | |||
498 | .dellink = ip_tunnel_dellink, | 498 | .dellink = ip_tunnel_dellink, |
499 | .get_size = ipip_get_size, | 499 | .get_size = ipip_get_size, |
500 | .fill_info = ipip_fill_info, | 500 | .fill_info = ipip_fill_info, |
501 | .get_link_net = ip_tunnel_get_link_net, | ||
501 | }; | 502 | }; |
502 | 503 | ||
503 | static struct xfrm_tunnel ipip_handler __read_mostly = { | 504 | static struct xfrm_tunnel ipip_handler __read_mostly = { |