aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/xfrm6_mode_beet.c4
-rw-r--r--net/ipv6/xfrm6_policy.c4
-rw-r--r--net/key/af_key.c2
-rw-r--r--net/xfrm/xfrm_state.c8
4 files changed, 8 insertions, 10 deletions
diff --git a/net/ipv6/xfrm6_mode_beet.c b/net/ipv6/xfrm6_mode_beet.c
index 9949a356d62c..1e205c3253ac 100644
--- a/net/ipv6/xfrm6_mode_beet.c
+++ b/net/ipv6/xfrm6_mode_beet.c
@@ -95,8 +95,8 @@ static int xfrm6_beet_input(struct xfrm_state *x, struct sk_buff *skb)
95 95
96 ip6h = ipv6_hdr(skb); 96 ip6h = ipv6_hdr(skb);
97 ip6h->payload_len = htons(skb->len - size); 97 ip6h->payload_len = htons(skb->len - size);
98 ip6h->daddr = *(struct in6_addr *)&x->sel.daddr.a6; 98 ip6h->daddr = x->sel.daddr.in6;
99 ip6h->saddr = *(struct in6_addr *)&x->sel.saddr.a6; 99 ip6h->saddr = x->sel.saddr.in6;
100 err = 0; 100 err = 0;
101out: 101out:
102 return err; 102 return err;
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index 91d934c22a2a..f337a908a76a 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -61,9 +61,7 @@ static int xfrm6_get_saddr(struct net *net,
61 return -EHOSTUNREACH; 61 return -EHOSTUNREACH;
62 62
63 dev = ip6_dst_idev(dst)->dev; 63 dev = ip6_dst_idev(dst)->dev;
64 ipv6_dev_get_saddr(dev_net(dev), dev, 64 ipv6_dev_get_saddr(dev_net(dev), dev, &daddr->in6, 0, &saddr->in6);
65 (struct in6_addr *)&daddr->a6, 0,
66 (struct in6_addr *)&saddr->a6);
67 dst_release(dst); 65 dst_release(dst);
68 return 0; 66 return 0;
69} 67}
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 9255fd9d94bc..f0d52d721b3a 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -709,7 +709,7 @@ static unsigned int pfkey_sockaddr_fill(const xfrm_address_t *xaddr, __be16 port
709 sin6->sin6_family = AF_INET6; 709 sin6->sin6_family = AF_INET6;
710 sin6->sin6_port = port; 710 sin6->sin6_port = port;
711 sin6->sin6_flowinfo = 0; 711 sin6->sin6_flowinfo = 0;
712 sin6->sin6_addr = *(struct in6_addr *)xaddr->a6; 712 sin6->sin6_addr = xaddr->in6;
713 sin6->sin6_scope_id = 0; 713 sin6->sin6_scope_id = 0;
714 return 128; 714 return 128;
715 } 715 }
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index de971b6d38c5..f5e39e35d73a 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1043,12 +1043,12 @@ static struct xfrm_state *__find_acq_core(struct net *net,
1043 break; 1043 break;
1044 1044
1045 case AF_INET6: 1045 case AF_INET6:
1046 *(struct in6_addr *)x->sel.daddr.a6 = *(struct in6_addr *)daddr; 1046 x->sel.daddr.in6 = daddr->in6;
1047 *(struct in6_addr *)x->sel.saddr.a6 = *(struct in6_addr *)saddr; 1047 x->sel.saddr.in6 = saddr->in6;
1048 x->sel.prefixlen_d = 128; 1048 x->sel.prefixlen_d = 128;
1049 x->sel.prefixlen_s = 128; 1049 x->sel.prefixlen_s = 128;
1050 *(struct in6_addr *)x->props.saddr.a6 = *(struct in6_addr *)saddr; 1050 x->props.saddr.in6 = saddr->in6;
1051 *(struct in6_addr *)x->id.daddr.a6 = *(struct in6_addr *)daddr; 1051 x->id.daddr.in6 = daddr->in6;
1052 break; 1052 break;
1053 } 1053 }
1054 1054