Repository navigation
Commit ef53def
ipv6: fix incorrect ipsec fragment
[ Upstream commit 0c18337 ]
Since commit ad0081e
"ipv6: Fragment locally generated tunnel-mode IPSec6 packets as needed"
the fragment of packets is incorrect.
because tunnel mode needs IPsec headers and trailer for all fragments,
while on transport mode it is sufficient to add the headers to the
first fragment and the trailer to the last.
so modify mtu and maxfraglen base on ipsec mode and if fragment is first
or last.
with my test,it work well(every fragment's size is the mtu)
and does not trigger slow fragment path.
Changes from v1:
though optimization, mtu_prev and maxfraglen_prev can be delete.
replace xfrm mode codes with dst_entry's new frag DST_XFRM_TUNNEL.
add fuction ip6_append_data_mtu to make codes clearer.
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>1 parent f653363 commit ef53def
3 files changed
Lines changed: 54 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1178 | 1178 | | |
1179 | 1179 | | |
1180 | 1180 | | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
1181 | 1204 | | |
1182 | 1205 | | |
1183 | 1206 | | |
| |||
1187 | 1210 | | |
1188 | 1211 | | |
1189 | 1212 | | |
1190 | | - | |
| 1213 | + | |
1191 | 1214 | | |
1192 | 1215 | | |
1193 | 1216 | | |
| |||
1245 | 1268 | | |
1246 | 1269 | | |
1247 | 1270 | | |
1248 | | - | |
1249 | | - | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
1250 | 1277 | | |
1251 | 1278 | | |
1252 | 1279 | | |
| |||
1342 | 1369 | | |
1343 | 1370 | | |
1344 | 1371 | | |
1345 | | - | |
1346 | 1372 | | |
1347 | | - | |
1348 | | - | |
1349 | 1373 | | |
1350 | | - | |
1351 | | - | |
| 1374 | + | |
| 1375 | + | |
1352 | 1376 | | |
1353 | 1377 | | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
1354 | 1384 | | |
1355 | 1385 | | |
1356 | 1386 | | |
1357 | 1387 | | |
1358 | 1388 | | |
1359 | 1389 | | |
1360 | | - | |
1361 | | - | |
1362 | 1390 | | |
1363 | | - | |
| 1391 | + | |
| 1392 | + | |
1364 | 1393 | | |
1365 | 1394 | | |
1366 | 1395 | | |
| |||
1369 | 1398 | | |
1370 | 1399 | | |
1371 | 1400 | | |
1372 | | - | |
1373 | | - | |
1374 | | - | |
1375 | | - | |
1376 | | - | |
1377 | | - | |
1378 | | - | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
1379 | 1411 | | |
1380 | 1412 | | |
1381 | 1413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1919 | 1919 | | |
1920 | 1920 | | |
1921 | 1921 | | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
1922 | 1925 | | |
1923 | 1926 | | |
1924 | 1927 | | |
| |||
0 commit comments