diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ip6_output.c | 4 | ||||
-rw-r--r-- | net/ipv6/xfrm6_policy.c | 17 |
2 files changed, 19 insertions, 2 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index d54da616e3af..4686646058d3 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -1126,7 +1126,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, | |||
1126 | sk->sk_sndmsg_page = NULL; | 1126 | sk->sk_sndmsg_page = NULL; |
1127 | sk->sk_sndmsg_off = 0; | 1127 | sk->sk_sndmsg_off = 0; |
1128 | exthdrlen = rt->u.dst.header_len + (opt ? opt->opt_flen : 0) - | 1128 | exthdrlen = rt->u.dst.header_len + (opt ? opt->opt_flen : 0) - |
1129 | rt->nfheader_len; | 1129 | rt->rt6i_nfheader_len; |
1130 | length += exthdrlen; | 1130 | length += exthdrlen; |
1131 | transhdrlen += exthdrlen; | 1131 | transhdrlen += exthdrlen; |
1132 | } else { | 1132 | } else { |
@@ -1141,7 +1141,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, | |||
1141 | 1141 | ||
1142 | hh_len = LL_RESERVED_SPACE(rt->u.dst.dev); | 1142 | hh_len = LL_RESERVED_SPACE(rt->u.dst.dev); |
1143 | 1143 | ||
1144 | fragheaderlen = sizeof(struct ipv6hdr) + rt->nfheader_len + | 1144 | fragheaderlen = sizeof(struct ipv6hdr) + rt->rt6i_nfheader_len + |
1145 | (opt ? opt->opt_nflen : 0); | 1145 | (opt ? opt->opt_nflen : 0); |
1146 | maxfraglen = ((mtu - fragheaderlen) & ~7) + fragheaderlen - sizeof(struct frag_hdr); | 1146 | maxfraglen = ((mtu - fragheaderlen) & ~7) + fragheaderlen - sizeof(struct frag_hdr); |
1147 | 1147 | ||
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c index d26b7dc3f33b..cf373b46a1ba 100644 --- a/net/ipv6/xfrm6_policy.c +++ b/net/ipv6/xfrm6_policy.c | |||
@@ -98,6 +98,20 @@ static int xfrm6_get_tos(struct flowi *fl) | |||
98 | return 0; | 98 | return 0; |
99 | } | 99 | } |
100 | 100 | ||
101 | static int xfrm6_init_path(struct xfrm_dst *path, struct dst_entry *dst, | ||
102 | int nfheader_len) | ||
103 | { | ||
104 | if (dst->ops->family == AF_INET6) { | ||
105 | struct rt6_info *rt = (struct rt6_info*)dst; | ||
106 | if (rt->rt6i_node) | ||
107 | path->path_cookie = rt->rt6i_node->fn_sernum; | ||
108 | } | ||
109 | |||
110 | path->u.rt6.rt6i_nfheader_len = nfheader_len; | ||
111 | |||
112 | return 0; | ||
113 | } | ||
114 | |||
101 | static int xfrm6_fill_dst(struct xfrm_dst *xdst, struct net_device *dev) | 115 | static int xfrm6_fill_dst(struct xfrm_dst *xdst, struct net_device *dev) |
102 | { | 116 | { |
103 | struct rt6_info *rt = (struct rt6_info*)xdst->route; | 117 | struct rt6_info *rt = (struct rt6_info*)xdst->route; |
@@ -115,6 +129,8 @@ static int xfrm6_fill_dst(struct xfrm_dst *xdst, struct net_device *dev) | |||
115 | RTF_LOCAL); | 129 | RTF_LOCAL); |
116 | xdst->u.rt6.rt6i_metric = rt->rt6i_metric; | 130 | xdst->u.rt6.rt6i_metric = rt->rt6i_metric; |
117 | xdst->u.rt6.rt6i_node = rt->rt6i_node; | 131 | xdst->u.rt6.rt6i_node = rt->rt6i_node; |
132 | if (rt->rt6i_node) | ||
133 | xdst->route_cookie = rt->rt6i_node->fn_sernum; | ||
118 | xdst->u.rt6.rt6i_gateway = rt->rt6i_gateway; | 134 | xdst->u.rt6.rt6i_gateway = rt->rt6i_gateway; |
119 | xdst->u.rt6.rt6i_dst = rt->rt6i_dst; | 135 | xdst->u.rt6.rt6i_dst = rt->rt6i_dst; |
120 | xdst->u.rt6.rt6i_src = rt->rt6i_src; | 136 | xdst->u.rt6.rt6i_src = rt->rt6i_src; |
@@ -266,6 +282,7 @@ static struct xfrm_policy_afinfo xfrm6_policy_afinfo = { | |||
266 | .find_bundle = __xfrm6_find_bundle, | 282 | .find_bundle = __xfrm6_find_bundle, |
267 | .decode_session = _decode_session6, | 283 | .decode_session = _decode_session6, |
268 | .get_tos = xfrm6_get_tos, | 284 | .get_tos = xfrm6_get_tos, |
285 | .init_path = xfrm6_init_path, | ||
269 | .fill_dst = xfrm6_fill_dst, | 286 | .fill_dst = xfrm6_fill_dst, |
270 | }; | 287 | }; |
271 | 288 | ||